Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: completion for "info -f" does not work
> 2022/03/16 3:05, Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx> wrote:
>
> + if [[ $PREFIX = (./|../|/)* ]]; then
> + files=( $^infopath/*.info(|.gz|.bz2)(-.:t:s/.gz//:s/.bz2//:r) )
> + tags=(files)
> + items=()
> + else
(snip)
> + _requested files expl 'file' && _files -g '*.info(|.gz|.bz2)'
'info -f' accept any (relative or absolute) pathnames. For example,
info -f foo/bar.info
works; we need not type ./foo/bar.info.
So the pattern (./|../|/)* is to restrictive, I think.
# And if tags is set only to (files), we need not set the array files.
For the -f option, isn't it simpler just to use the action
_files -g "*.info(|.gz|.bz2)"
instead of
->infofiles ?
Specs for 'tkinfo' command (I don't know this command) have
'-file:info file:->infofiles'
but I _guess_ ->infofiles can be replaced in the same way.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author