diff options
author | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2000-04-11 07:57:56 +0000 |
---|---|---|
committer | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2000-04-11 07:57:56 +0000 |
commit | fac3086d9782e73dcaf1aa65fd36a0b63a374719 (patch) | |
tree | 7bab35e2787ca17f02ec932dffae1bfff2ffcfe3 /Completion/User/_lp | |
parent | 37012f06a7e5e8a64614dbf9032c77cff1bcfcfb (diff) | |
download | zsh-fac3086d9782e73dcaf1aa65fd36a0b63a374719.tar.gz zsh-fac3086d9782e73dcaf1aa65fd36a0b63a374719.tar.xz zsh-fac3086d9782e73dcaf1aa65fd36a0b63a374719.zip |
_wanted now tests both tags and labels; change places where _wanted was called without a command; allow multiple patterns per string in file-patterns; update _next_tags to work with labels (10632)
Diffstat (limited to 'Completion/User/_lp')
-rw-r--r-- | Completion/User/_lp | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/Completion/User/_lp b/Completion/User/_lp index e996507ce..60cf8cfd0 100644 --- a/Completion/User/_lp +++ b/Completion/User/_lp @@ -36,28 +36,27 @@ if (( ! $+_lp_cache )); then fi if compset -P -P || [[ "$words[CURRENT-1]" = -P ]]; then - if _wanted printers; then - if zstyle -T ":completion:${curcontext}:printers" verbose; then - zformat -a list ' -- ' "$_lp_cache[@]" - disp=(-ld list) - else - disp=() - fi - _all_labels printers expl printer \ - compadd "$disp[@]" - "${(@)_lp_cache%%:*}" && return 0 + if zstyle -T ":completion:${curcontext}:printers" verbose; then + zformat -a list ' -- ' "$_lp_cache[@]" + disp=(-ld list) + else + disp=() + fi + _wanted printers expl printer \ + compadd "$disp[@]" - "${(@)_lp_cache%%:*}" && return 0 - (( $+_lp_alias_cache )) || return 1 + (( $+_lp_alias_cache )) || return 1 - if zstyle -T ":completion:${curcontext}:printers" verbose; then - zformat -a list ' -- ' "$_lp_alias_cache[@]" - disp=(-ld list) - else - disp=() - fi - compadd "$expl[@]" "$disp[@]" - "${(@)_lp_alias_cache%%:*}" + if zstyle -T ":completion:${curcontext}:printers" verbose; then + zformat -a list ' -- ' "$_lp_alias_cache[@]" + disp=(-ld list) else - return 1 + disp=() fi + _wanted printers expl printer \ + compadd "$disp[@]" - "${(@)_lp_alias_cache%%:*}" && return 0 + + return 1 else if [[ "${words[1]:t}" = (lpq|lprm) ]]; then if [[ "$words" = *-P* ]]; then |