Merge pull request #530 from tomonacci/fix-ibus-positional-arguments
_ibus: avoid the use of positional arguments
This commit is contained in:
commit
80eca0f068
|
@ -46,8 +46,8 @@ typeset -A opt_args
|
||||||
local curcontext=$curcontext
|
local curcontext=$curcontext
|
||||||
|
|
||||||
_arguments -C \
|
_arguments -C \
|
||||||
"1:command:(($(ibus help|sed -ne 's/^ \(\S\+\) \+\(.*\)/"\1\\:\2"/p')))" \
|
":command:(($(ibus help|sed -ne 's/^ \(\S\+\) \+\(.*\)/"\1\\:\2"/p')))" \
|
||||||
'*: :->args' \
|
'*:: :->args' \
|
||||||
&& return
|
&& return
|
||||||
|
|
||||||
case $state in
|
case $state in
|
||||||
|
@ -55,21 +55,19 @@ case $state in
|
||||||
case $line[1] in
|
case $line[1] in
|
||||||
engine)
|
engine)
|
||||||
_arguments \
|
_arguments \
|
||||||
"2:engine:(($(ibus list-engine|sed -ne 's/:/\\\\:/g' -e 's/^ \(\S\+\) - \(.*\)$/"\1:\2"/p')))" \
|
":engine:(($(ibus list-engine|sed -ne 's/:/\\\\:/g' -e 's/^ \(\S\+\) - \(.*\)$/"\1:\2"/p')))" \
|
||||||
&& return
|
&& return
|
||||||
;;
|
;;
|
||||||
read-cache)
|
read-cache)
|
||||||
_arguments \
|
_arguments \
|
||||||
'--system[show the content of the system registry cache]' \
|
'--system[show the content of the system registry cache]' \
|
||||||
'--file=[custom registry cache to show]:registry cache:_files' \
|
'--file=[custom registry cache to show]:registry cache:_files' \
|
||||||
'*: : ' \
|
|
||||||
&& return
|
&& return
|
||||||
;;
|
;;
|
||||||
write-cache)
|
write-cache)
|
||||||
_arguments \
|
_arguments \
|
||||||
'--system[save the system registry cache]' \
|
'--system[save the system registry cache]' \
|
||||||
'--file=[custom registry cache to save]:registry cache:_files' \
|
'--file=[custom registry cache to save]:registry cache:_files' \
|
||||||
'*: : ' \
|
|
||||||
&& return
|
&& return
|
||||||
;;
|
;;
|
||||||
emoji)
|
emoji)
|
||||||
|
@ -77,7 +75,6 @@ case $state in
|
||||||
'--font=[emoji font]:emoji font: ' \
|
'--font=[emoji font]:emoji font: ' \
|
||||||
'--lang=[language of emoji annotations]:language:_language_codes ISO-639-1' \
|
'--lang=[language of emoji annotations]:language:_language_codes ISO-639-1' \
|
||||||
'--partial-match[match annotations with a partial string]' \
|
'--partial-match[match annotations with a partial string]' \
|
||||||
'*: : ' \
|
|
||||||
&& return
|
&& return
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
Loading…
Reference in New Issue