Support 'fvm dart' completion

This commit is contained in:
Shohei YOSHIDA
2023-05-18 15:15:16 +09:00
parent 4f59353fe1
commit 4516f61d96
+14
View File
@@ -55,6 +55,14 @@ _fvm_run_flutter() {
fi
}
_fvm_run_dart() {
local begin=$(($CURRENT - 1))
if (( $+functions[_dart] )); then
compset -n $begin
_dart "$@"
fi
}
_fvm() {
typeset -A opt_args
local context state line
@@ -93,6 +101,12 @@ _fvm() {
'(- *)'{-h,--help}'[Print this usage information]' \
&& ret=0
;;
(dart)
_arguments -C \
'1: :_fvm_run_dart' \
'*: :_normal' \
&& ret=0
;;
(exec)
_arguments -C \
'*::args:_normal' \