2021-02-28 20:40:25 +00:00
|
|
|
#compdef balena
|
|
|
|
#autoload
|
|
|
|
|
|
|
|
#GENERATED FILE DON'T MODIFY#
|
|
|
|
|
|
|
|
_balena() {
|
|
|
|
typeset -A opt_args
|
|
|
|
local context state line curcontext="$curcontext"
|
|
|
|
|
|
|
|
# Valid top-level completions
|
2024-09-24 18:52:59 +00:00
|
|
|
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 tags tunnel util version whoami )
|
2021-02-28 20:40:25 +00:00
|
|
|
# Sub-completions
|
2024-09-24 16:47:00 +00:00
|
|
|
api_key_cmds=( generate list revoke )
|
2023-05-25 15:05:47 +00:00
|
|
|
app_cmds=( create )
|
2023-05-25 15:59:27 +00:00
|
|
|
block_cmds=( create )
|
2021-02-28 20:40:25 +00:00
|
|
|
config_cmds=( generate inject read reconfigure write )
|
2024-09-24 16:26:16 +00:00
|
|
|
device_cmds=( deactivate identify init list local-mode move os-update pin public-url purge reboot register rename restart rm shutdown start-service stop-service track-fleet )
|
2021-02-28 20:40:25 +00:00
|
|
|
devices_cmds=( supported )
|
2024-09-24 18:52:59 +00:00
|
|
|
env_cmds=( add list rename rm )
|
2024-09-24 16:53:37 +00:00
|
|
|
fleet_cmds=( create list pin purge rename restart rm track-latest )
|
2021-02-28 20:40:25 +00:00
|
|
|
internal_cmds=( osinit )
|
|
|
|
local_cmds=( configure flash )
|
|
|
|
os_cmds=( build-config configure download initialize versions )
|
2024-09-24 17:46:21 +00:00
|
|
|
release_cmds=( finalize invalidate list validate )
|
2024-09-25 11:32:08 +00:00
|
|
|
ssh_key_cmds=( add list rm )
|
2021-02-28 20:40:25 +00:00
|
|
|
tag_cmds=( rm set )
|
|
|
|
|
|
|
|
|
|
|
|
_arguments -C \
|
|
|
|
'(- 1 *)--version[show version and exit]' \
|
|
|
|
'(- 1 *)'{-h,--help}'[show help options and exit]' \
|
|
|
|
'1:first command:_balena_main_cmds' \
|
|
|
|
'2:second command:_balena_sec_cmds' \
|
|
|
|
&& ret=0
|
|
|
|
}
|
|
|
|
|
|
|
|
(( $+functions[_balena_main_cmds] )) ||
|
|
|
|
_balena_main_cmds() {
|
|
|
|
_describe -t main_commands 'command' main_commands "$@" && ret=0
|
|
|
|
}
|
|
|
|
|
|
|
|
(( $+functions[_balena_sec_cmds] )) ||
|
|
|
|
_balena_sec_cmds() {
|
|
|
|
case $line[1] in
|
|
|
|
"api-key")
|
|
|
|
_describe -t api_key_cmds 'api-key_cmd' api_key_cmds "$@" && ret=0
|
|
|
|
;;
|
2023-05-25 15:05:47 +00:00
|
|
|
"app")
|
|
|
|
_describe -t app_cmds 'app_cmd' app_cmds "$@" && ret=0
|
|
|
|
;;
|
2023-05-25 15:59:27 +00:00
|
|
|
"block")
|
|
|
|
_describe -t block_cmds 'block_cmd' block_cmds "$@" && ret=0
|
|
|
|
;;
|
2021-02-28 20:40:25 +00:00
|
|
|
"config")
|
|
|
|
_describe -t config_cmds 'config_cmd' config_cmds "$@" && ret=0
|
|
|
|
;;
|
|
|
|
"device")
|
|
|
|
_describe -t device_cmds 'device_cmd' device_cmds "$@" && ret=0
|
|
|
|
;;
|
|
|
|
"devices")
|
|
|
|
_describe -t devices_cmds 'devices_cmd' devices_cmds "$@" && ret=0
|
|
|
|
;;
|
|
|
|
"env")
|
|
|
|
_describe -t env_cmds 'env_cmd' env_cmds "$@" && ret=0
|
|
|
|
;;
|
2021-07-15 13:41:38 +00:00
|
|
|
"fleet")
|
|
|
|
_describe -t fleet_cmds 'fleet_cmd' fleet_cmds "$@" && ret=0
|
|
|
|
;;
|
2021-02-28 20:40:25 +00:00
|
|
|
"internal")
|
|
|
|
_describe -t internal_cmds 'internal_cmd' internal_cmds "$@" && ret=0
|
|
|
|
;;
|
|
|
|
"local")
|
|
|
|
_describe -t local_cmds 'local_cmd' local_cmds "$@" && ret=0
|
|
|
|
;;
|
|
|
|
"os")
|
|
|
|
_describe -t os_cmds 'os_cmd' os_cmds "$@" && ret=0
|
|
|
|
;;
|
2021-09-18 23:07:58 +00:00
|
|
|
"release")
|
|
|
|
_describe -t release_cmds 'release_cmd' release_cmds "$@" && ret=0
|
|
|
|
;;
|
2024-09-25 11:32:08 +00:00
|
|
|
"ssh-key")
|
|
|
|
_describe -t ssh_key_cmds 'ssh-key_cmd' ssh_key_cmds "$@" && ret=0
|
|
|
|
;;
|
2021-02-28 20:40:25 +00:00
|
|
|
"tag")
|
|
|
|
_describe -t tag_cmds 'tag_cmd' tag_cmds "$@" && ret=0
|
|
|
|
;;
|
|
|
|
|
|
|
|
esac
|
|
|
|
}
|
|
|
|
|
|
|
|
_balena "$@"
|