diff options
author | Tanaka Akira <akr@users.sourceforge.net> | 1999-08-19 11:18:05 +0000 |
---|---|---|
committer | Tanaka Akira <akr@users.sourceforge.net> | 1999-08-19 11:18:05 +0000 |
commit | 9867c4091e71e6ed69889a9bfaee07275d2fa04e (patch) | |
tree | 37318116ff90f7b90df7cb9e894790d96be0849b /Completion/Base/_tilde | |
parent | 04979daf4f9b9645f22df1dfbb5974ab82294868 (diff) | |
download | zsh-9867c4091e71e6ed69889a9bfaee07275d2fa04e.tar.gz zsh-9867c4091e71e6ed69889a9bfaee07275d2fa04e.tar.xz zsh-9867c4091e71e6ed69889a9bfaee07275d2fa04e.zip |
manual/7448
Diffstat (limited to 'Completion/Base/_tilde')
-rw-r--r-- | Completion/Base/_tilde | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/Completion/Base/_tilde b/Completion/Base/_tilde index d03030821..f249d4ffa 100644 --- a/Completion/Base/_tilde +++ b/Completion/Base/_tilde @@ -7,7 +7,7 @@ # `(( compstate[nmatches] )) || compgen -nu -qS/' # below that. -local c s dirs list +local d c s dirs list if [[ "$SUFFIX" = */* ]]; then ISUFFIX="/${SUFFIX#*/}$ISUFFIX" @@ -24,6 +24,8 @@ if compset -P +; then printf("%s\t%s\n", $1, $2); }' <<<$dirs)" list=("${(@)list% *}") c=(-y '$dirs' -k "($list)") + + _description d 'directory stack' elif compset -P -; then dirs="$(dirs -v)" list=("${(f)dirs}") @@ -31,8 +33,16 @@ elif compset -P -; then printf("%s\t%s\n", $1, $2); }' <<<$dirs)" list=("${(@)list% *}") c=(-y '$dirs' -k "($list)") + + _description d 'directory stack' else c=(-nu) + + if (( $# )); then + d=( "$@" ) + else + _description d user + fi fi -compgen "$c[@]" "$s[@]" +compgen "$d[@]" "$c[@]" "$s[@]" |