Bug 1103783 - [GSS] (6.4) Code completion in CLI should handle ~ specifically and replace it by appropriate value
Summary: [GSS] (6.4) Code completion in CLI should handle ~ specifically and replace i...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: CLI
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: DR1
: EAP 6.4.0
Assignee: Alexey Loubyansky
QA Contact: Petr Kremensky
URL:
Whiteboard:
Depends On:
Blocks: 1055898
TreeView+ depends on / blocked
 
Reported: 2014-06-02 14:25 UTC by Radim Hatlapatka
Modified: 2019-08-19 12:41 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
UNIX-like platforms
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker WFLY-2794 0 Major Resolved FileSystemPathArgument doesn't translate paths in getValue(args, required) 2017-04-16 23:14:21 UTC

Description Radim Hatlapatka 2014-06-02 14:25:24 UTC
Description of problem:
When using ~ in path using CLI completion for file paths (the only place I know of is patch apply command), it is directly passed as String. The ~ is sh specific and Java doesn't understand it. It should be automatically expanded to appropriate value ($HOME)

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


How reproducible: always


Steps to Reproduce:
1. put some valid patch for EAP to ~/
2. start jboss-cli client
3. use patch apply ~/... with path completion (using tab for completion)

Actual results:
String remains with ~/..


Expected results:
String should be replace with $HOME/.... => /home/username/patch.zip

Additional info:
~ in JAVA doesn't have the same special meaning as it has in bash

Comment 1 Alexey Loubyansky 2014-07-09 10:33:59 UTC
Looks like it's been fixed in wildfly 8.0.0.Final. The string, though, is still not replaced on the command line, it remains looking the way the user entered it. The tab-completion works properly, though, and the path gets resolved correctly during the command execution.

Comment 3 Alexey Loubyansky 2014-07-21 14:05:13 UTC
The PR is https://github.com/jbossas/jboss-eap/pull/1531

Comment 4 Petr Kremensky 2014-09-19 08:04:19 UTC
Using EAP 6.2.1 patch for test purposes.

6.3.0.GA
[disconnected /] patch apply ~/jboss-eap-6.2.1.zip
Path /home/pkremens/jboss-eap-6.3/bin/~/jboss-eap-6.2.1.zip doesn't exist.

6.4.0.DR1.1
[disconnected /] patch apply ~/jboss-eap-6.2.1.zip
JBAS016840: Patch does not apply - expected (6.2.0.GA), but was (6.4.0.Alpha1)

Verified on EAP 6.4.0.DR1.1


Note You need to log in before you can comment on or make changes to this bug.