diff options
Diffstat (limited to 'Completion')
-rw-r--r-- | Completion/Base/_tilde | 1 | ||||
-rw-r--r-- | Completion/Core/_all_labels | 9 | ||||
-rw-r--r-- | Completion/Core/_requested | 2 |
3 files changed, 9 insertions, 3 deletions
diff --git a/Completion/Base/_tilde b/Completion/Base/_tilde index 7ab058e01..7d31185b7 100644 --- a/Completion/Base/_tilde +++ b/Completion/Base/_tilde @@ -18,6 +18,7 @@ _tags users named-directories directory-stack while _tags; do _requested users && _users "$suf[@]" "$@" && ret=0 + _requested named-directories expl 'named directory' \ compadd "$suf[@]" "$@" - "${(@k)nameddirs}" diff --git a/Completion/Core/_all_labels b/Completion/Core/_all_labels index a03112ee4..72d9d0317 100644 --- a/Completion/Core/_all_labels +++ b/Completion/Core/_all_labels @@ -1,6 +1,11 @@ #autoload -local gopt=-J len tmp pre suf ret=1 descr spec +local gopt=-J len tmp pre suf ret=1 descr spec prev + +if [[ "$1" = - ]]; then + prev=- + shift +fi if [[ "$1" = -([12]|)[VJ] ]]; then gopt="$1" @@ -20,7 +25,7 @@ else suf=5 fi -while comptags -A "$1" curtag spec; do +while comptags "-A$prev" "$1" curtag spec; do _comp_tags="$_comp_tags $spec " if [[ "$curtag" = *:* ]]; then zformat -f descr "${curtag#*:}" "d:$3" diff --git a/Completion/Core/_requested b/Completion/Core/_requested index 90fdec279..01dee8f11 100644 --- a/Completion/Core/_requested +++ b/Completion/Core/_requested @@ -9,7 +9,7 @@ fi if comptags -R "$1"; then if [[ $# -gt 3 ]]; then - _all_labels "$gopt" "$@" + _all_labels - "$gopt" "$@" elif [[ $# -gt 1 ]]; then _description "$gopt" "$@" fi |