[Bash-completion-devel] [SCM] bash-completion branch, master, updated. 1.90-47-g068a1a1
Ville Skyttä
ville.skytta at iki.fi
Wed Nov 16 22:55:15 UTC 2011
On 11/17/2011 01:42 AM, Igor Murzov wrote:
> It turns out that without inner quotes bash converts "\ " to " " and this breaks things. Looks like it's better to use inner quotes everywhere for such expressions.
Yuck :(
>> BTW, I suppose the outer quotes are unnecessary, is that incorrect?
>
> Outer quotes are still necessary, they apply to a result, and inner quotes to an argument.
Sure, but I still don't know of a case where they would be necessary.
For example, using your previous example values and assignments:
$ set -x
$ x="a\ b c\ d e\ f"
+ x='a\ b c\ d e\ f'
$ y="a\ b"
+ y='a\ b'
Now, with outer quotes:
$ z="${x#"$y"}"
+ z=' c\ d e\ f'
...and without them:
$ z=${x#"$y"}
+ z=' c\ d e\ f'
No difference there...
More information about the Bash-completion-devel
mailing list