Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
RE: generic filename completion like "foo --file=ba<tab>"
- X-seq: zsh-users 4527
- From: Borsenkow Andrej <Andrej.Borsenkow@xxxxxxxxxxxxxx>
- To: "'Peter Stephenson'" <pws@xxxxxxx>, "'Zsh users list'" <zsh-users@xxxxxxxxxx>, "'Michael Wardle'" <michael@xxxxxxxxxxxxxx>
- Subject: RE: generic filename completion like "foo --file=ba<tab>"
- Date: Tue, 11 Dec 2001 15:49:16 +0300
- Importance: Normal
- In-reply-to: <28713.1008073725@xxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
> > I'm a former bash user starting to learn zsh. I'm currently running
> > zsh 4.0.2 on Red Hat Linux, and zsh seems to be missing a feature I
> > like.
> >
> > In bash, I could do:
> > dd if=root.img of=/dev/f<tab>
> >
> > In zsh, pressing the filename completion key (tabulate) does not
> > produce the desired result.
>
> The new completion system will do this, and has completion of dd
arguments
> as well.
Yes and now. It does have completion for dd but it does not do it for
arbitrary command. I am not sure if it is a bug or feature. After all,
you cannot assume that `=' is always followed by file name.
You can configure default completion to be smarter. In new completion it
would use something like
[[ compset -P *= ]] && return _files
return 1
and then you need to tell to use it as fallback but do not ask me at the
moment how to do it :-) I expected it to be
put the above is some function like _default_completion
use compdef to define it:
compdef _default_completion -default-
but it does not work
-andrej
Messages sorted by:
Reverse Date,
Date,
Thread,
Author