diff options
author | Tanaka Akira <akr@users.sourceforge.net> | 1999-12-15 17:35:20 +0000 |
---|---|---|
committer | Tanaka Akira <akr@users.sourceforge.net> | 1999-12-15 17:35:20 +0000 |
commit | 8bc41ba869dbbd3c6bc2c8f2338c740311074f23 (patch) | |
tree | d595aeb0a5e399d4cb6a7dfd3818c395e9118ec0 /Completion/Core/_tags | |
parent | e401df24821d873eba579d2961a0886881b0acf6 (diff) | |
download | zsh-8bc41ba869dbbd3c6bc2c8f2338c740311074f23.tar.gz zsh-8bc41ba869dbbd3c6bc2c8f2338c740311074f23.tar.xz zsh-8bc41ba869dbbd3c6bc2c8f2338c740311074f23.zip |
manual/9058
Diffstat (limited to 'Completion/Core/_tags')
-rw-r--r-- | Completion/Core/_tags | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/Completion/Core/_tags b/Completion/Core/_tags index fcef91061..e913095c4 100644 --- a/Completion/Core/_tags +++ b/Completion/Core/_tags @@ -4,7 +4,7 @@ if (( $# )); then # We have arguments: the tags supported in this context. - local curcontext="$curcontext" order + local curcontext="$curcontext" order tag nodef if [[ "$1" = -C?* ]]; then curcontext="${curcontext}:${1[3,-1]}" @@ -38,9 +38,24 @@ if (( $# )); then _offered_tags=( "$_offered_tags[@]" "$@" ) _last_tags=() - # Call the function that sorts the tags into sets. + # Sort the tags. - "${_sort_tags:-_sort_tags}" "$@" + if [[ -n "$_sort_tags" ]]; then + "$_sort_tags" "$@" + elif zstyle -a ":completion${curcontext}" tag-order order; then + + for tag in $order; do + case $tag in + -) nodef=yes;; + *\(\)) "${${tag%%[ ]#\(\)}##[ ]#}" "$@";; + ?*) comptry ${=tag};; + esac + done + + [[ -z "$nodef" ]] && comptry "$@" + else + comptry "$@" + fi # Return non-zero if at least one set of tags should be used. |