diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2008-06-13 14:27:37 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2008-06-13 14:27:37 +0000 |
commit | aadd07e05f18a41e44129cbbb1b37796a54a685f (patch) | |
tree | d255d406f0099d70e992c05366713182b318177d /Completion/Zsh/Context | |
parent | 627c7db0e5c891c0878558e14b60f187009b5001 (diff) | |
download | zsh-aadd07e05f18a41e44129cbbb1b37796a54a685f.tar.gz zsh-aadd07e05f18a41e44129cbbb1b37796a54a685f.tar.xz zsh-aadd07e05f18a41e44129cbbb1b37796a54a685f.zip |
zcalc completion idiosyncracies with :!
Diffstat (limited to 'Completion/Zsh/Context')
-rw-r--r-- | Completion/Zsh/Context/_zcalc_line | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/Completion/Zsh/Context/_zcalc_line b/Completion/Zsh/Context/_zcalc_line index 6ce3d82bf..76e5b4b25 100644 --- a/Completion/Zsh/Context/_zcalc_line +++ b/Completion/Zsh/Context/_zcalc_line @@ -22,7 +22,7 @@ _zcalc_line_escapes() { _zcalc_line() { local expl - if [[ CURRENT -eq 1 && $words[1] != ":!"* ]]; then + if [[ CURRENT -eq 1 && $words[1] != ":"(\\|)"!"* ]]; then local -a alts if [[ $words[1] = (|:*) ]]; then alts=("command-escapes:command escape:_zcalc_line_escapes") @@ -35,15 +35,13 @@ _zcalc_line() { fi case $words[1] in - (":!"*) - if [[ $words[1] = ":!" ]]; then + (":"(\\|)"!"*) + if [[ $words[1] = ":"(\\|)"!" && CURRENT -gt 1 ]]; then shift words - (( CURRENT >1 && CURRENT-- )) + (( CURRENT-- )) else - words[1]=${words[1]##:\!} - if (( CURRENT == 1 )); then - compset -P ":\!" - fi + words[1]=${words[1]##:(\\|)\!} + compset -P ':(\\|)!' fi _normal ;; |