diff options
author | Tanaka Akira <akr@users.sourceforge.net> | 1999-12-15 02:28:14 +0000 |
---|---|---|
committer | Tanaka Akira <akr@users.sourceforge.net> | 1999-12-15 02:28:14 +0000 |
commit | bccfe3b1576c2a1eb1219ec3894d89998249fbcf (patch) | |
tree | 75f69c6ca849bbf91edbdad291d9f39d6ac12172 /Completion/Core/_sort_tags | |
parent | d5fbda44c32c6d9905406b074ebeccb26e263055 (diff) | |
download | zsh-bccfe3b1576c2a1eb1219ec3894d89998249fbcf.tar.gz zsh-bccfe3b1576c2a1eb1219ec3894d89998249fbcf.tar.xz zsh-bccfe3b1576c2a1eb1219ec3894d89998249fbcf.zip |
zsh-workers/9048
Diffstat (limited to 'Completion/Core/_sort_tags')
-rw-r--r-- | Completion/Core/_sort_tags | 59 |
1 files changed, 35 insertions, 24 deletions
diff --git a/Completion/Core/_sort_tags b/Completion/Core/_sort_tags index 6f07eec1c..20897823a 100644 --- a/Completion/Core/_sort_tags +++ b/Completion/Core/_sort_tags @@ -1,28 +1,39 @@ #autoload -comptry arguments values -comptry options +local stags tag -case "$curcontext" in -# Some silly examples commented out: -# -# *::*p[bgpn]m:*) # change the order for file-completion -# comptry globbed-files directories -# comptry all-files -# ;; -# *::dvips::-o*) # automatic context set by _arguments -# comptry all-files -# return -# ;; -# *::kill:*) -# comptry processes -# return # this return ensures that we use only processes -# ;; -*) - comptry globbed-files - comptry directories - comptry all-files - ;; -esac +if zstyle -a ":completion${curcontext}" sort-tags stags; then -comptry "$@" + for tag in $stags; do + [[ $tag != '' ]] && comptry ${=tag} + done + +else + + comptry arguments values + comptry options + + case "$curcontext" in + # Some silly examples commented out: + # + # *::*p[bgpn]m:*) # change the order for file-completion + # comptry globbed-files directories + # comptry all-files + # ;; + # *::dvips::-o*) # automatic context set by _arguments + # comptry all-files + # return + # ;; + # *::kill:*) + # comptry processes + # return # this return ensures that we use only processes + # ;; + *) + comptry globbed-files + comptry directories + comptry all-files + ;; + esac + + comptry "$@" +fi |