Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] new completion for jot
I'll push the patch with the following modification:
diff --git a/Completion/BSD/Command/_jot b/Completion/BSD/Command/_jot
index 67116d3..e8abcb7 100644
--- a/Completion/BSD/Command/_jot
+++ b/Completion/BSD/Command/_jot
@@ -41,6 +41,7 @@ case $state in
'c:character'
)
+ compset -P '([^%]#%%)#'
if compset -P '[^%]#%'; then
# flags: (|\#)(| )(|+|-)
compset -P '(\#|\\\#)' && flags=( ${(@)flags:#\#*} )
@@ -56,10 +57,11 @@ case $state in
if compset -P '((|l)[diouxX]|[feEgGc])'; then
_message -e format-rest 'rest of the format' && ret=0
else
- (( $#flags )) && _describe -t flags 'flag' flags -S '' && ret=0
- _describe -t width-precision 'width.precision' digits -S '' && ret=0
- _describe -t conversion-specifiers 'conversion specifier' \
- conversions -S '' && ret=0
+ local opts=( -S '' )
+ _alternative -O opts 'flags:flag:(( $flags ))' \
+ "width-precision:width.precision:($digits)" \
+ 'conversion-specifiers:conversion specifier:(( $conversions ))' \
+ && ret=0
fi
else
local expl
Messages sorted by:
Reverse Date,
Date,
Thread,
Author