summary refs log tree commit diff
diff options
context:
space:
mode:
authorMikael Magnusson <mikachu@gmail.com>2015-07-15 13:47:17 +0200
committerMikael Magnusson <mikachu@gmail.com>2015-07-15 13:47:33 +0200
commitb6a2f116a1ebd403b9cd1967a7eae6b634bba6a5 (patch)
tree40e4ec3993a5f26e656ac08b96f6865c6d5776c1
parentb230e6d11d78271f3fc2492b51ddf8f7c109b500 (diff)
downloadzsh-b6a2f116a1ebd403b9cd1967a7eae6b634bba6a5.tar.gz
zsh-b6a2f116a1ebd403b9cd1967a7eae6b634bba6a5.tar.xz
zsh-b6a2f116a1ebd403b9cd1967a7eae6b634bba6a5.zip
unposted: _ps1234: Fix ternary test char completion
-rw-r--r--ChangeLog5
-rw-r--r--Completion/Zsh/Type/_ps12346
2 files changed, 8 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 25bd98f76..6ee125d8a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-07-15  Mikael Magnusson  <mikachu@gmail.com>
+
+	* unposted: Completion/Zsh/Type/_ps1234: unposted: _ps1234:
+	Fix ternary test char completion
+
 2015-07-14  Oliver Kiddle  <opk@zsh.org>
 
 	* 35789: (tweaked c.f. Bart: 35791) Completion/Unix/Type/_files:
diff --git a/Completion/Zsh/Type/_ps1234 b/Completion/Zsh/Type/_ps1234
index 76ba1e3c6..125a62152 100644
--- a/Completion/Zsh/Type/_ps1234
+++ b/Completion/Zsh/Type/_ps1234
@@ -15,7 +15,7 @@ while (( changed )); do
   compset -P '%[DFK](\\|){[^}]#}' && changed=1 # formats with arg: %x{...}
   compset -P '%[0-9-\\]#[^DFK(0-9-<>\\\[]' && changed=1 # normal formats
   compset -P '%[0-9-\\]#(<[^<]#<|>[^>]#>|\[[^\]]#\])' && changed=1 # truncations
-  compset -P '%[0-9-\\]#(\\|)\(??|[^%]' && changed=1 # start of ternary
+  compset -P '%[0-9-\\]#(\\|)\([0-9]#[^0-9]?|[^%]' && changed=1 # start of ternary
   compset -P '[^%]##' && changed=1 # sundry other characters
   # %D/%F/%K without a following { ... }
   [[ $PREFIX = %(-|)<->#[DFK](\\|)[^{\\]* ]] &&
@@ -59,12 +59,12 @@ if compset -P '%[FK]'; then
   fi
 fi
 
-if compset -P '%[0-9-\\]#\(?'; then
+if compset -P '%[0-9-\\]#\([0-9]#[^0-9]'; then
   compset -S '*'
   _delimiters && ret=0
 elif compset -P '%[0-9-\\]#[<>\]]'; then
   _message -e replacements 'replacement string'
-elif compset -P '%[0-9-\\]#(\\|)\('; then
+elif compset -P '%[0-9-\\]#(\\|)\([0-9]#'; then
   compset -S '[.:+/-%]*' || suf=( -S . )
   compset -S '*'
   specs=(