1.) The command
echo "~/*"
prints
~/* in bash
2) In FluidShell the command lists the home directoy
|
27 KB
The root cause of this problem has something to do with how quoted string is handled by the parser.
In current implementation, parser does the followings in the order described below:
(1) Performs variable expansion and command substitution:
BashContext.exapnd()
BashContext.splitAndAppend()
(2) Performs alias expansion:
BashContext.expandAndSplit()
(3) Performs tilde expansion and pathname expansion:
BashContext.makeCommandLine()
After step (1) is done, quotes of a quoted string are removed, and de-quoted text is passed down to step(2) and step (3).
Step (3) does not known whether the original text is quoted or not.
We probably need to some more study/test and see what is the best way to deal with quoted text.
Note that on UNIX, the arguments passed to the ls command below are all evaluated to "This is a sentence":
<D> - double quote
<S> - single quote
> ls <D>This is a sentence<D>
> ls <D>This <D>is<S> a <S>sentence
> ls <D>This <D>is<S><S><S> a <S>sentence
Issue #6669 |
Closed |
Fixed |
Resolved |
Completion |
No due date |
Fixed Build 11.0.0-rc-45 |
No time estimate |
The root cause of this problem has something to do with how quoted string is handled by the parser.
In current implementation, parser does the followings in the order described below:
(1) Performs variable expansion and command substitution:
BashContext.exapnd()
BashContext.splitAndAppend()
(2) Performs alias expansion:
BashContext.expandAndSplit()
(3) Performs tilde expansion and pathname expansion:
BashContext.makeCommandLine()
After step (1) is done, quotes of a quoted string are removed, and de-quoted text is passed down to step(2) and step (3).
Step (3) does not known whether the original text is quoted or not.
We probably need to some more study/test and see what is the best way to deal with quoted text.
Note that on UNIX, the arguments passed to the ls command below are all evaluated to "This is a sentence":
<D> - double quote
<S> - single quote
> ls <D>This is a sentence<D>
> ls <D>This <D>is<S> a <S>sentence
> ls <D>This <D>is<S><S><S> a <S>sentence