Bug 883419

Summary: Console Installer Should Respect Tab Extends for Filling in Paths
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Jim Tyrrell <jtyrrell>
Component: InstallerAssignee: Miles Tjandrawidjaja <mtjandra>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.0.0CC: mtjandra, myarboro, pgier, pkremens, thauser
Target Milestone: ER1   
Target Release: EAP 6.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1001736 (view as bug list) Environment:
Last Closed: 2013-12-15 16:22:29 UTC Type: Feature Request
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1001736    

Description Jim Tyrrell 2012-12-04 14:56:07 UTC
Description of problem:
When running the jar installer, tab extend does not fill in the path for the installation path.

Version-Release number of selected component (if applicable):


How reproducible:
Every time

Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Miles Tjandrawidjaja 2013-06-18 19:22:57 UTC
Autocomplete functionality has been added.

http://git.app.eng.bos.redhat.com/?p=izpack.git;a=commit;h=9fc73102150ed19e64c0bba08161f591645ec2ac

Comment 4 Petr Kremensky 2013-09-13 08:32:35 UTC
Verified on EAP 6.2.0.ER1

Comment 5 Petr Kremensky 2013-09-23 15:54:10 UTC
Tilde character ('~') is wrongly extended to "home/" instead of ${HOME}

Comment 6 Miles Tjandrawidjaja 2013-09-30 13:47:07 UTC
Hello, could you please, explain how you produced this. The tilde should be replaced by your $HOME environment variable. Please confirm that the $HOME variables is not set to /home. Thank you.

Comment 7 Petr Kremensky 2013-09-30 14:52:43 UTC
Hi, I found what went wrong. If I enter only tilde and hit the tab key, tilde is replaced by "home/". Is this correct behaviour? Thanks.

Comment 8 Miles Tjandrawidjaja 2013-09-30 18:37:49 UTC
Hello,

The autocomplete feature is implemented through the jline library version 0.9.94.
I took a look at the source and this is the intended behaviour. (See Below)

if (translated.startsWith("~" + File.separator)) {
    translated = System.getProperty("user.home")
                 + translated.substring(1);
} else if (translated.startsWith("~")) {
    translated = new File(System.getProperty("user.home")).getParentFile()
                                                          .getAbsolutePath();
} else if (!(translated.startsWith(File.separator))) {
    translated = new File("").getAbsolutePath() + File.separator
                 + translated;
}

Your home directory should be correctly displayed if you try to tab complete with "~/" instead of "~". The jline dependency comes from brew so applying a patch to this may have bad side effects. If it's necessary maybe we could build our own version of jline to meet this need. Let me know, thanks.

Comment 9 Petr Kremensky 2013-10-01 06:52:30 UTC
Hi Miles,
I don't think that is really needed. Thanks for clarification. Returning to previous state.

Verified on EAP 6.2.0.ER1