Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
compset -P '/'
- X-seq: zsh-workers 9409
- From: Tanaka Akira <akr@xxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: compset -P '/'
- Date: 23 Jan 2000 20:48:49 +0900
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
I found a problem with completion.
Z(2):akr@is27e1u11% Src/zsh -f
is27e1u11% bindkey -e; autoload -U compinit; compinit -D; compdef _tst tst
is27e1u11% rm -rf z
is27e1u11% mkdir z z/y
is27e1u11% touch z/a
is27e1u11% _tst () {
function> compset -P '/'
function> _path_files -g '*(^/)'
function> _path_files -g '*(/)'
function> }
is27e1u11% tst /z/<TAB>
->
is27e1u11% tst /
zsh removes `z/' and the cursor is places on retained `/'.
But it should complete the file `a' and the directory `y'.
If the prefix is a colon rather than a slash, it works well.
is27e1u11% _tst () {
compset -P ':'
_path_files -g '*(^/)'
_path_files -g '*(/)'
}
is27e1u11% tst :z/<TAB>
a y/
--
Tanaka Akira
Messages sorted by:
Reverse Date,
Date,
Thread,
Author