summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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=(