mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-04 10:41:11 +02:00
Add a special-dirs example.
This commit is contained in:
parent
77339cc21d
commit
d4a5b9916f
2 changed files with 12 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2002-02-12 Bart Schaefer <schaefer@zsh.org>
|
||||||
|
|
||||||
|
* unposted: Doc/Zsh/compsys.yo: special-dirs example derived from
|
||||||
|
zsh-users/4656.
|
||||||
|
|
||||||
2002-02-12 Sven Wischnowsky <wischnow@zsh.org>
|
2002-02-12 Sven Wischnowsky <wischnow@zsh.org>
|
||||||
|
|
||||||
* 16609: Completion/Base/Core/_all_labels,
|
* 16609: Completion/Base/Core/_all_labels,
|
||||||
|
|
|
@ -2033,6 +2033,13 @@ Normally, the completion code will not produce the directory names
|
||||||
`tt(.)' and `tt(..)' as possible completions. If this style is set to
|
`tt(.)' and `tt(..)' as possible completions. If this style is set to
|
||||||
`true', it will add both `tt(.)' and `tt(..)' as possible completions;
|
`true', it will add both `tt(.)' and `tt(..)' as possible completions;
|
||||||
if it is set to `tt(..)', only `tt(..)' will be added.
|
if it is set to `tt(..)', only `tt(..)' will be added.
|
||||||
|
|
||||||
|
The following example sets tt(special-dirs) to `tt(..)' only when the
|
||||||
|
current prefix is empty, is a single `tt(.)', or consists only of a path
|
||||||
|
beginning with one or more `tt(../)', and otherwise sets it to `false'.
|
||||||
|
|
||||||
|
example(zstyle -e ':completion:*' special-dirs \
|
||||||
|
'[[ $PREFIX = LPAR()../RPAR()#LPAR()|.|..RPAR() ]] && reply=LPAR()..RPAR()')
|
||||||
)
|
)
|
||||||
kindex(squeeze-slashes, completion style)
|
kindex(squeeze-slashes, completion style)
|
||||||
item(tt(squeeze-slashes))(
|
item(tt(squeeze-slashes))(
|
||||||
|
|
Loading…
Reference in a new issue