zsh-workers
 help / color / mirror / code / Atom feed
* Non-escaped special chars from var expansion
@ 2018-11-02 20:39 Wayne Davison
  2018-11-02 22:06 ` Peter Stephenson
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Wayne Davison @ 2018-11-02 20:39 UTC (permalink / raw)
  To: Zsh list

[-- Attachment #1: Type: text/plain, Size: 993 bytes --]

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..

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-11-17  6:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-02 20:39 Non-escaped special chars from var expansion Wayne Davison
2018-11-02 22:06 ` Peter Stephenson
2018-11-03 19:49   ` Peter Stephenson
2018-11-02 23:21 ` Wayne Davison
2019-11-17  6:00 ` Wayne Davison

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).