zsh-workers
 help / color / mirror / code / Atom feed
* problem with _expand (I think)
@ 2006-02-24 22:20 Wayne Davison
  2006-02-25  0:56 ` Barton Schaefer
  0 siblings, 1 reply; 4+ messages in thread
From: Wayne Davison @ 2006-02-24 22:20 UTC (permalink / raw)
  To: zsh-workers

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


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

end of thread, other threads:[~2006-03-08  7:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-24 22:20 problem with _expand (I think) Wayne Davison
2006-02-25  0:56 ` Barton Schaefer
2006-02-25  9:36   ` Wayne Davison
2006-03-08  7:57     ` 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).