diff options
author | Alberto Sartori <alberto.sartori@huawei.com> | 2023-02-08 15:39:31 +0100 |
---|---|---|
committer | Alberto Sartori <alberto.sartori@huawei.com> | 2023-02-08 15:39:31 +0100 |
commit | 18b5ba83c79232efba513b554dea12263e5e5f9e (patch) | |
tree | e0924019a34b30dda7662bc26cb408fdfd8796cb | |
parent | 7b5e9ee02231a837f4f0bb6a195ba2eeee93920a (diff) | |
download | justbuild-18b5ba83c79232efba513b554dea12263e5e5f9e.tar.gz |
bash autocompletion: update completion for gc and execute
-rw-r--r-- | share/just_complete.bash | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/share/just_complete.bash b/share/just_complete.bash index 1ada0d1d..7a7c00c0 100644 --- a/share/just_complete.bash +++ b/share/just_complete.bash @@ -78,7 +78,7 @@ EOF } _just_completion(){ - local readonly SUBCOMMANDS=(build analyse describe install-cas install rebuild gc -h --help version) + local readonly SUBCOMMANDS=(build analyse describe install-cas install rebuild gc execute -h --help version) local word=${COMP_WORDS[$COMP_CWORD]} local prev=${COMP_WORDS[$((COMP_CWORD-1))]} local cmd=${COMP_WORDS[1]} @@ -86,15 +86,15 @@ _just_completion(){ local conf # first check if the current word matches a subcommand # if we check directly with cmd, we fail to autocomplete install to install-cas - if [[ $word =~ ^(build|analyse|describe|install-cas|install|rebuild|gc) ]] + if [[ $word =~ ^(build|analyse|describe|install-cas|install|rebuild|gc|execute) ]] then COMPREPLY=($(compgen -W "${SUBCOMMANDS[*]}" -- $word)) - elif [[ $cmd =~ ^(install-cas) ]] + elif [[ $cmd =~ ^(install-cas|execute|gc) ]] then local _opts=($(_just_subcommand_options $cmd)) COMPREPLY=($(compgen -f -W "${_opts[*]}" -- $word )) compopt -o plusdirs -o bashdefault -o default - elif [[ $cmd =~ ^(build|analyse|describe|install|rebuild|gc) ]] + elif [[ $cmd =~ ^(build|analyse|describe|install|rebuild) ]] then local _opts=($(_just_subcommand_options $cmd)) # look for -C and --main @@ -162,7 +162,7 @@ EOF } _just-mr_completion(){ - local readonly SUBCOMMANDS=(setup setup-env fetch update "do" version build analyse describe install-cas install rebuild gc) + local readonly SUBCOMMANDS=(setup setup-env fetch update "do" version build analyse describe install-cas install rebuild gc execute) local word=${COMP_WORDS[$COMP_CWORD]} local prev=${COMP_WORDS[$((COMP_CWORD-1))]} local cmd=$(_just-mr_parse_subcommand "${COMP_WORDS[@]}") @@ -184,7 +184,7 @@ _just-mr_completion(){ local _opts=($(_just-mr_options "just-mr $cmd")) local _repos=($(_just-mr_repos $prev)) COMPREPLY=($(compgen -f -W "${_opts[*]} ${_repos[*]}" -- $word )) - elif [[ "$cmd" =~ ^(version|build|analyse|describe|install-cas|install|rebuild|gc) ]] + elif [[ "$cmd" =~ ^(version|build|analyse|describe|install-cas|install|rebuild|gc|execute) ]] then # just subcommand options and modules/targets eventually using the # auto-generated configuration |