Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Non-escaped special chars from var expansion
- X-seq: zsh-workers 43751
- From: Wayne Davison <wayne@xxxxxxxxxxxxx>
- To: Zsh list <zsh-workers@xxxxxxx>
- Subject: Non-escaped special chars from var expansion
- Date: Fri, 2 Nov 2018 13:39:26 -0700
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed; d=opencoder.net; h= mime-version:from:date:message-id:subject:to:content-type; s= opencoder.net; bh=pTHx+WENIix0wlE1YMes98abGMc=; b=mSuNl68NmFbUlG DnIRvhSR6E5cxz0khpfI+/54w2LTv9lReDyW0sAcvleMVNo+rI0pRQr69aD1KcPd l9ArLAB/V5jPHHkJORdWWq16j+M8DRNg1hR/ecyZKOL+QrmvJW2LmwPh4znwlh2h DBYgUgKohGg14u+K46SHGAIeZ2/Ak=
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
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