diff --git a/automation/capitanodoc/capitanodoc.ts b/automation/capitanodoc/capitanodoc.ts index b4b4f39f..6c5cf6b8 100644 --- a/automation/capitanodoc/capitanodoc.ts +++ b/automation/capitanodoc/capitanodoc.ts @@ -65,6 +65,12 @@ const commandHeadings: { [key: string]: string } = { orgs: 'Organizations', os: 'OS', util: 'Utilities', + ssh: 'Network', + scan: 'Network', + tunnel: 'Network', + build: 'Deploy', + join: 'Platform', + leave: 'Platform', }; // Fetch all available commands diff --git a/completion/_balena b/completion/_balena index 3a9d6b40..317c5f5b 100644 --- a/completion/_balena +++ b/completion/_balena @@ -8,14 +8,13 @@ _balena() { local context state line curcontext="$curcontext" # Valid top-level completions - main_commands=( api-key api-keys app auth block config deploy deploy device device devices env envs fleet fleet fleets internal key key keys local logs network notes orgs os platform preload push release release releases settings support tag tags util version ) + main_commands=( api-key api-keys app auth block build config deploy device device devices env envs fleet fleet fleets internal join key key keys leave local logs notes orgs os preload push release release releases scan settings ssh support tag tags tunnel util version ) # Sub-completions api_key_cmds=( generate revoke ) app_cmds=( create ) auth_cmds=( login logout whoami ) block_cmds=( create ) config_cmds=( generate inject read reconfigure write ) - deploy_cmds=( build ) device_cmds=( deactivate identify init local-mode move os-update pin public-url purge reboot register rename restart rm shutdown start-service stop-service track-fleet ) devices_cmds=( supported ) env_cmds=( add rename rm ) @@ -23,9 +22,7 @@ _balena() { internal_cmds=( osinit ) key_cmds=( add rm ) local_cmds=( configure flash ) - network_cmds=( scan ssh tunnel ) os_cmds=( build-config configure download initialize versions ) - platform_cmds=( join leave ) release_cmds=( finalize invalidate validate ) tag_cmds=( rm set ) @@ -61,9 +58,6 @@ _balena_sec_cmds() { "config") _describe -t config_cmds 'config_cmd' config_cmds "$@" && ret=0 ;; - "deploy") - _describe -t deploy_cmds 'deploy_cmd' deploy_cmds "$@" && ret=0 - ;; "device") _describe -t device_cmds 'device_cmd' device_cmds "$@" && ret=0 ;; @@ -85,15 +79,9 @@ _balena_sec_cmds() { "local") _describe -t local_cmds 'local_cmd' local_cmds "$@" && ret=0 ;; - "network") - _describe -t network_cmds 'network_cmd' network_cmds "$@" && ret=0 - ;; "os") _describe -t os_cmds 'os_cmd' os_cmds "$@" && ret=0 ;; - "platform") - _describe -t platform_cmds 'platform_cmd' platform_cmds "$@" && ret=0 - ;; "release") _describe -t release_cmds 'release_cmd' release_cmds "$@" && ret=0 ;; diff --git a/completion/balena-completion.bash b/completion/balena-completion.bash index eee0311a..6dfcf37f 100644 --- a/completion/balena-completion.bash +++ b/completion/balena-completion.bash @@ -7,14 +7,13 @@ _balena_complete() local cur prev # Valid top-level completions - main_commands="api-key api-keys app auth block config deploy deploy device device devices env envs fleet fleet fleets internal key key keys local logs network notes orgs os platform preload push release release releases settings support tag tags util version" + main_commands="api-key api-keys app auth block build config deploy device device devices env envs fleet fleet fleets internal join key key keys leave local logs notes orgs os preload push release release releases scan settings ssh support tag tags tunnel util version" # Sub-completions api_key_cmds="generate revoke" app_cmds="create" auth_cmds="login logout whoami" block_cmds="create" config_cmds="generate inject read reconfigure write" - deploy_cmds="build" device_cmds="deactivate identify init local-mode move os-update pin public-url purge reboot register rename restart rm shutdown start-service stop-service track-fleet" devices_cmds="supported" env_cmds="add rename rm" @@ -22,9 +21,7 @@ _balena_complete() internal_cmds="osinit" key_cmds="add rm" local_cmds="configure flash" - network_cmds="scan ssh tunnel" os_cmds="build-config configure download initialize versions" - platform_cmds="join leave" release_cmds="finalize invalidate validate" tag_cmds="rm set" @@ -55,9 +52,6 @@ _balena_complete() config) COMPREPLY=( $(compgen -W "$config_cmds" -- $cur) ) ;; - deploy) - COMPREPLY=( $(compgen -W "$deploy_cmds" -- $cur) ) - ;; device) COMPREPLY=( $(compgen -W "$device_cmds" -- $cur) ) ;; @@ -79,15 +73,9 @@ _balena_complete() local) COMPREPLY=( $(compgen -W "$local_cmds" -- $cur) ) ;; - network) - COMPREPLY=( $(compgen -W "$network_cmds" -- $cur) ) - ;; os) COMPREPLY=( $(compgen -W "$os_cmds" -- $cur) ) ;; - platform) - COMPREPLY=( $(compgen -W "$platform_cmds" -- $cur) ) - ;; release) COMPREPLY=( $(compgen -W "$release_cmds" -- $cur) ) ;;