Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: _files vs _path_files discussion (old thread)
- X-seq: zsh-workers 10079
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: Adam Spiers <adam@xxxxxxxxxx>, zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: _files vs _path_files discussion (old thread)
- Date: Sun, 12 Mar 2000 00:18:53 +0000
- In-reply-to: <20000311222225.A27795@xxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <199909170728.JAA01949@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <20000311222225.A27795@xxxxxxxxxxxxxxxxxxxxxxx>
On Mar 11, 10:22pm, Adam Spiers wrote:
} Subject: Re: _files vs _path_files discussion (old thread)
}
} > > A second issue is whether, if you find target files in the current
} > > directory, you might still want to complete directories.
}
} Does the new zstyle stuff now provide some kind of configurability to
} solve this issue?
Yes, it's the tag-order style.
} Suppose I have, in the cwd, a file `foo.tar.gz' and a directory `foo'.
} I type:
}
} $ tar zxf foo<TAB>
}
} Currently, this immediately completes to `foo.tar.gz'. But what if I
} actually wanted to extract a .tar.gz from somewhere within the
} directory foo?
zstyle ':completion::complete:tar::' \
tag-order 'globbed-files directories all-files'
By putting all the tags in the same argument, they're all treated as
equal for purposes of completions. You could also do
zstyle ':completion::complete:tar::' \
tag-order 'globbed-files directories' all-files
(that is, put all-files in a separate argument) to get shown all possible
files only if there are no globbed-files or directories. The default is
as if you had
zstyle ':completion::complete:tar::' \
tag-order globbed-files directories all-files
(that is, all in separate arguments), which in turn depends on some of
the command-line options passed to _files by _tar (so it's not the same
for all completions that use _files).
} Incidentally, the more I understand of the new completion system, the
} more I like it. [...] Congratulations to everyone involved,
} especially (needless to say) Sven!
Right, three cheers for Sven! And thanks.
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Messages sorted by:
Reverse Date,
Date,
Thread,
Author