Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Non-escaped special chars from var expansion



Hi, folks! Long time no see...

I have a particular compinit setup where special-chars from a var (other
than spaces) are not backslash-escaped.  To duplicate:

zsh -f
autoload -Uz compinit
compinit
zstyle ':completion:*' completer _oldlist _expand _complete _match _ignored
_files _prefix
zstyle ':completion:*:expand:*' tag-order all-expansions
bindkey -e
bindkey '\t' complete-word
mkdir 'foo; bar (baz)'
cd !:1
cd $PWD<tab>

The result is "cd foo;\ bar\ (baz)" instead of "cd foo\;\ bar\ \(baz\)". If
the <tab> instead executes expand-or-complete rather than complete-word
then it is expanded correctly, but I like to avoid var expansion in a path
unless I'm expanding the var itself (e.g. I don't want "vim
$OLDPWD/fname<TAB>" to expand $OLDPWD since I'm not tabbing right next to
the var).

The bug has been around for ages, and is still in the current git source.
I'm guessing that the _expand script needs a tweak, but I didn't see what
might be wrong after a quick glance.

..wayne..


Messages sorted by: Reverse Date, Date, Thread, Author