When using completion inside a double quoted string, zsh strips the leading "
. E.g.
export PATH="$HOME/software<TAB>
becomes
export PATH=$HOME/software
How can I convince zsh that I like the leading double quote and keep it?
Asked
Active
Viewed 312 times
2

georg
- 755
- 2
- 7
- 13
-
For me, that does not happen if there is no parameter inside the double quotes. Default behaviour seems to be to replace parameters by their value and remove double quotes in favour of quoting by "\" : `"foo $HOME bar
` → `foo\ /home/adaephon\ bar`. If there are no parameters, the double quotes remain: `"/home/ad – Adaephon Nov 13 '14 at 08:14` → `"/home/adaephon` -
@Adaephon: You are right, this behavior only occurs when environment variables are referenced inside the started quoted string. You can disable the expansion of environment variables by setting zstyle accordingly: `zstyle ':completion:*' completer _complete _ignored` i.e. without the `_expand` keyword. – georg Nov 13 '14 at 14:21