Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
problem with _expand (I think)
- X-seq: zsh-workers 22299
- From: Wayne Davison <wayned@xxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: problem with _expand (I think)
- Date: Fri, 24 Feb 2006 14:20:03 -0800
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
Here's something strange where a global alias of mine seems to be
skipped by _expand in certain circumstances. To duplicate this,
start with "zsh -f" and enter these commands:
autoload -U compinit
compinit
zstyle ':completion:*' completer _expand _complete
bindkey '\t' complete-word
alias -g ,f='|fgrep'
OK, that ensures that tab does not use expand-or-complete, which does
not exhibit the bug. Note that I created a global alias that lets me
type ",f" instead of "|fgrep". We also need a file named "some-file"
with the following lines in it:
foo
bar
Now let's try to use TAB to expand a back-tick expression:
echo `fgrep some-file o ,f -v a`
That outputs "foo" when run, but the expansion gets "some-file:bar"
instead of "foo" if TAB is pressed. This is apparently because the ",f"
was treated as a file, and the -v option was reordered in front of the
'o' (due to gnu's non-posix command-line parsing).
I tried this in 4.2.5 and 4.3.0-dev-5, and both fail to get this right.
FYI.
..wayne..
Messages sorted by:
Reverse Date,
Date,
Thread,
Author