diff --git a/completion/_balena b/completion/_balena index f85d784e..547ef187 100644 --- a/completion/_balena +++ b/completion/_balena @@ -8,7 +8,7 @@ _balena() { local context state line curcontext="$curcontext" # Valid top-level completions - main_commands=( api-key app block build config deploy device devices env fleet internal join leave local login logout logs notes orgs os preload push release scan settings ssh ssh-key support tag tunnel util version whoami ) + main_commands=( api-key app block build config deploy device devices env fleet internal join leave local login logout logs notes organization os preload push release scan settings ssh ssh-key support tag tunnel util version whoami ) # Sub-completions api_key_cmds=( generate list revoke ) app_cmds=( create ) @@ -20,6 +20,7 @@ _balena() { fleet_cmds=( create list pin purge rename restart rm track-latest ) internal_cmds=( osinit ) local_cmds=( configure flash ) + organization_cmds=( list ) os_cmds=( build-config configure download initialize versions ) release_cmds=( finalize invalidate list validate ) ssh_key_cmds=( add list rm ) @@ -72,6 +73,9 @@ _balena_sec_cmds() { "local") _describe -t local_cmds 'local_cmd' local_cmds "$@" && ret=0 ;; + "organization") + _describe -t organization_cmds 'organization_cmd' organization_cmds "$@" && ret=0 + ;; "os") _describe -t os_cmds 'os_cmd' os_cmds "$@" && ret=0 ;; diff --git a/completion/balena-completion.bash b/completion/balena-completion.bash index 664ff1fa..4d831061 100644 --- a/completion/balena-completion.bash +++ b/completion/balena-completion.bash @@ -7,7 +7,7 @@ _balena_complete() local cur prev # Valid top-level completions - main_commands="api-key app block build config deploy device devices env fleet internal join leave local login logout logs notes orgs os preload push release scan settings ssh ssh-key support tag tunnel util version whoami" + main_commands="api-key app block build config deploy device devices env fleet internal join leave local login logout logs notes organization os preload push release scan settings ssh ssh-key support tag tunnel util version whoami" # Sub-completions api_key_cmds="generate list revoke" app_cmds="create" @@ -19,6 +19,7 @@ _balena_complete() fleet_cmds="create list pin purge rename restart rm track-latest" internal_cmds="osinit" local_cmds="configure flash" + organization_cmds="list" os_cmds="build-config configure download initialize versions" release_cmds="finalize invalidate list validate" ssh_key_cmds="add list rm" @@ -66,6 +67,9 @@ _balena_complete() local) COMPREPLY=( $(compgen -W "$local_cmds" -- $cur) ) ;; + organization) + COMPREPLY=( $(compgen -W "$organization_cmds" -- $cur) ) + ;; os) COMPREPLY=( $(compgen -W "$os_cmds" -- $cur) ) ;; diff --git a/docs/balena-cli.md b/docs/balena-cli.md index a4636993..19f31a37 100644 --- a/docs/balena-cli.md +++ b/docs/balena-cli.md @@ -255,7 +255,7 @@ are encouraged to regularly update the balena CLI to the latest version. - [notes](#notes) -- Organizations +- Organization - [orgs](#orgs) @@ -2778,7 +2778,7 @@ device UUID -# Organizations +# Organization ## orgs diff --git a/src/commands/orgs/index.ts b/src/commands/organization/list.ts similarity index 100% rename from src/commands/orgs/index.ts rename to src/commands/organization/list.ts