diff options
author | Tanaka Akira <akr@users.sourceforge.net> | 1999-11-04 09:35:39 +0000 |
---|---|---|
committer | Tanaka Akira <akr@users.sourceforge.net> | 1999-11-04 09:35:39 +0000 |
commit | beb429d62fe8b11f9eef67c455bcfdc8fe9f2722 (patch) | |
tree | bcf6f449b7e8f0a4a45b4c672a8e440bd7fc809a /Completion/Core | |
parent | de7368c630aa09547d188248a8e9cc5dfff1bb4d (diff) | |
download | zsh-beb429d62fe8b11f9eef67c455bcfdc8fe9f2722.tar.gz zsh-beb429d62fe8b11f9eef67c455bcfdc8fe9f2722.tar.xz zsh-beb429d62fe8b11f9eef67c455bcfdc8fe9f2722.zip |
zsh-workers/8533
Diffstat (limited to 'Completion/Core')
-rw-r--r-- | Completion/Core/_files | 2 | ||||
-rw-r--r-- | Completion/Core/_main_complete | 3 | ||||
-rw-r--r-- | Completion/Core/_tags | 12 |
3 files changed, 11 insertions, 6 deletions
diff --git a/Completion/Core/_files b/Completion/Core/_files index e667289c5..4adae0f73 100644 --- a/Completion/Core/_files +++ b/Completion/Core/_files @@ -1,6 +1,6 @@ #autoload -local opts opt type=file prios tags +local opts opt type=file tags opts=() while getopts "P:S:qr:R:W:F:J:V:X:f/g:M:" opt; do diff --git a/Completion/Core/_main_complete b/Completion/Core/_main_complete index 877a975b3..d1d75de7f 100644 --- a/Completion/Core/_main_complete +++ b/Completion/Core/_main_complete @@ -17,8 +17,9 @@ # state than the global one for which you are completing. -local comp post ret=1 _compskip prios tags +local comp post ret=1 _compskip tags _prio_num=1 typeset -U _offered_tags _tried_tags _failed_tags _used_tags _unused_tags +typeset -A _prio_names _offered_tags=() _tried_tags=() diff --git a/Completion/Core/_tags b/Completion/Core/_tags index af8dc21dd..f6a7fdc11 100644 --- a/Completion/Core/_tags +++ b/Completion/Core/_tags @@ -63,17 +63,21 @@ if (( $# )); then done done - prios=( "${(@)tags:#}" ) + prio="_prio_arr$(( _prio_num++ ))" + _prio_names[$funcstack]="$prio" + eval "${prio}=( \"\${(@)tags:#}\" )" return 0 fi +local prios="$_prio_names[$funcstack]" + _failed_tags=( "$_failed_tags[@]" "$_last_tags[@]" ) -(( $#prios )) || return 1 +(( ${(P)#prios} )) || return 1 -tags="${prios[1]}:" -shift 1 prios +tags="${${(@P)prios}[1]}:" +shift 1 "$prios" _last_tags=( "${(@s.:.)${${tags#:}%:}}" ) _tried_tags=( "$_tried_tags[@]" "$_last_tags[@]" ) |