Add completions for the "--target=" argument.
This commit is contained in:
parent
8a2f368795
commit
704b3d479e
|
@ -8,7 +8,7 @@ _ybconAutoComplete() {
|
|||
COMPREPLY=()
|
||||
current="${COMP_WORDS[COMP_CWORD]}"
|
||||
previous="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
options='-h -p --help --printresult --version'
|
||||
options='-h -p --help --target= --printresult --version'
|
||||
if [[ "${current}" == -* ]]; then
|
||||
YCompReply "$(compgen -W "$options" -- "$current")"
|
||||
return 0
|
||||
|
|
|
@ -3,4 +3,5 @@ set -l commands --help -p --printresult
|
|||
complete -c ybcon -f -a "(__fish_complete_suffix .ybcon)"
|
||||
complete -c ybcon -x -s h -l help -d "Print the help screen"
|
||||
complete -c ybcon -x -l version -d "Print the version"
|
||||
complete -c ybcon -r -s p -l printresult -d "Enable printing the transpilation result to stdout"
|
||||
complete -c ybcon -l target= -k -x -a 'lua js py' -d "Set the transpilation target"
|
||||
complete -c ybcon -s p -l printresult -d "Enable printing the transpilation result to stdout"
|
|
@ -4,6 +4,7 @@ _ybcon() {
|
|||
_arguments \
|
||||
'( - 1)'{-h,--help}'[Print the help screen]' \
|
||||
'( - 1)'--version'[Print the version]' \
|
||||
'( - 1)'--target='[Set the transpilation target]:opt:(lua js py)' \
|
||||
'( - 1)'{-p,--printresult}'[Enable printing the transpilation result to stdout]' \
|
||||
"*:$completeyfile"
|
||||
return 0
|
||||
|
|
Loading…
Reference in New Issue