#compdef envio autoload -U is-at-least _envio() { typeset -A opt_args typeset -a _arguments_options local ret=1 if is-at-least 5.2; then _arguments_options=(-s -S -C) else _arguments_options=(-s -C) fi local context curcontext="$curcontext" state line _arguments "${_arguments_options[@]}" \ '-h[Print help]' \ '--help[Print help]' \ ":: :_envio_commands" \ "*::: :->envio" \ && ret=0 case $state in (envio) words=($line[1] "${words[@]}") (( CURRENT += 1 )) curcontext="${curcontext%:*:*}:envio-command-$line[1]:" case $line[1] in (create) _arguments "${_arguments_options[@]}" \ '-f+[]:ENVS_FILE: ' \ '--file-to-import-envs-from=[]:ENVS_FILE: ' \ '*-e+[]:ENVS: ' \ '*--envs=[]:ENVS: ' \ '-g+[]:GPG: ' \ '--gpg-key-fingerprint=[]:GPG: ' \ '-c[]' \ '--add-comments[]' \ '-x[]' \ '--add-expiration-date[]' \ '-h[Print help]' \ '--help[Print help]' \ ':profile_name:' \ && ret=0 ;; (add) _arguments "${_arguments_options[@]}" \ '*-e+[]:ENVS: ' \ '*--envs=[]:ENVS: ' \ '-c[]' \ '--add-comments[]' \ '-x[]' \ '--add-expiration-date[]' \ '-h[Print help]' \ '--help[Print help]' \ ':profile_name:' \ && ret=0 ;; (load) _arguments "${_arguments_options[@]}" \ '-h[Print help]' \ '--help[Print help]' \ ':profile_name:' \ && ret=0 ;; (unload) _arguments "${_arguments_options[@]}" \ '-h[Print help]' \ '--help[Print help]' \ && ret=0 ;; (launch) _arguments "${_arguments_options[@]}" \ '-c+[]:STRING_COMMAND: ' \ '--command=[]:STRING_COMMAND: ' \ '-h[Print help]' \ '--help[Print help]' \ ':profile_name:' \ '*::COMMAND:' \ && ret=0 ;; (remove) _arguments "${_arguments_options[@]}" \ '*-e+[]:ENVS: ' \ '*--envs-to-remove=[]:ENVS: ' \ '-h[Print help]' \ '--help[Print help]' \ ':profile_name:' \ && ret=0 ;; (list) _arguments "${_arguments_options[@]}" \ '-n+[]:PROFILE_NAME: ' \ '--profile-name=[]:PROFILE_NAME: ' \ '-p[]' \ '--profiles[]' \ '-v[]' \ '--no-pretty-print[]' \ '-c[]' \ '--display-comments[]' \ '-x[]' \ '--display-expiration-date[]' \ '-h[Print help]' \ '--help[Print help]' \ && ret=0 ;; (update) _arguments "${_arguments_options[@]}" \ '*-e+[]:ENVS: ' \ '*--envs=[]:ENVS: ' \ '-v[]' \ '--update-values[]' \ '-c[]' \ '--update-comments[]' \ '-x[]' \ '--update-expiration-date[]' \ '-h[Print help]' \ '--help[Print help]' \ ':profile_name:' \ && ret=0 ;; (export) _arguments "${_arguments_options[@]}" \ '-f+[]:FILE: ' \ '--file-to-export-to=[]:FILE: ' \ '*-e+[]:ENVS: ' \ '*--envs=[]:ENVS: ' \ '-h[Print help]' \ '--help[Print help]' \ ':profile_name:' \ && ret=0 ;; (import) _arguments "${_arguments_options[@]}" \ '-f+[]:FILE: ' \ '--file-to-import-from=[]:FILE: ' \ '-u+[]:URL: ' \ '--url=[]:URL: ' \ '-h[Print help]' \ '--help[Print help]' \ ':profile_name:' \ && ret=0 ;; (version) _arguments "${_arguments_options[@]}" \ '-v[]' \ '--verbose[]' \ '-h[Print help]' \ '--help[Print help]' \ && ret=0 ;; (help) _arguments "${_arguments_options[@]}" \ ":: :_envio__help_commands" \ "*::: :->help" \ && ret=0 case $state in (help) words=($line[1] "${words[@]}") (( CURRENT += 1 )) curcontext="${curcontext%:*:*}:envio-help-command-$line[1]:" case $line[1] in (create) _arguments "${_arguments_options[@]}" \ && ret=0 ;; (add) _arguments "${_arguments_options[@]}" \ && ret=0 ;; (load) _arguments "${_arguments_options[@]}" \ && ret=0 ;; (unload) _arguments "${_arguments_options[@]}" \ && ret=0 ;; (launch) _arguments "${_arguments_options[@]}" \ && ret=0 ;; (remove) _arguments "${_arguments_options[@]}" \ && ret=0 ;; (list) _arguments "${_arguments_options[@]}" \ && ret=0 ;; (update) _arguments "${_arguments_options[@]}" \ && ret=0 ;; (export) _arguments "${_arguments_options[@]}" \ && ret=0 ;; (import) _arguments "${_arguments_options[@]}" \ && ret=0 ;; (version) _arguments "${_arguments_options[@]}" \ && ret=0 ;; (help) _arguments "${_arguments_options[@]}" \ && ret=0 ;; esac ;; esac ;; esac ;; esac } (( $+functions[_envio_commands] )) || _envio_commands() { local commands; commands=( 'create:Create a new profile' \ 'add:Add envionment variables to a profile' \ 'load:Load all environment variables in a profile for use in your terminal sessions' \ 'unload:Unload a profile' \ 'launch:Run a command with the environment variables from a profile' \ 'remove:Remove a environment variable from a profile' \ 'list:List all the environment variables in a profile or all the profiles currenty stored' \ 'update:Update environment variables in a profile' \ 'export:Export a profile to a file if no file is specified it will be exported to a file named .env' \ 'import:Download a profile over the internet and import it into the system or import a locally stored profile into your current envio installation' \ 'version:Print the version' \ 'help:Print this message or the help of the given subcommand(s)' \ ) _describe -t commands 'envio commands' commands "$@" } (( $+functions[_envio__add_commands] )) || _envio__add_commands() { local commands; commands=() _describe -t commands 'envio add commands' commands "$@" } (( $+functions[_envio__help__add_commands] )) || _envio__help__add_commands() { local commands; commands=() _describe -t commands 'envio help add commands' commands "$@" } (( $+functions[_envio__create_commands] )) || _envio__create_commands() { local commands; commands=() _describe -t commands 'envio create commands' commands "$@" } (( $+functions[_envio__help__create_commands] )) || _envio__help__create_commands() { local commands; commands=() _describe -t commands 'envio help create commands' commands "$@" } (( $+functions[_envio__export_commands] )) || _envio__export_commands() { local commands; commands=() _describe -t commands 'envio export commands' commands "$@" } (( $+functions[_envio__help__export_commands] )) || _envio__help__export_commands() { local commands; commands=() _describe -t commands 'envio help export commands' commands "$@" } (( $+functions[_envio__help_commands] )) || _envio__help_commands() { local commands; commands=( 'create:Create a new profile' \ 'add:Add envionment variables to a profile' \ 'load:Load all environment variables in a profile for use in your terminal sessions' \ 'unload:Unload a profile' \ 'launch:Run a command with the environment variables from a profile' \ 'remove:Remove a environment variable from a profile' \ 'list:List all the environment variables in a profile or all the profiles currenty stored' \ 'update:Update environment variables in a profile' \ 'export:Export a profile to a file if no file is specified it will be exported to a file named .env' \ 'import:Download a profile over the internet and import it into the system or import a locally stored profile into your current envio installation' \ 'version:Print the version' \ 'help:Print this message or the help of the given subcommand(s)' \ ) _describe -t commands 'envio help commands' commands "$@" } (( $+functions[_envio__help__help_commands] )) || _envio__help__help_commands() { local commands; commands=() _describe -t commands 'envio help help commands' commands "$@" } (( $+functions[_envio__help__import_commands] )) || _envio__help__import_commands() { local commands; commands=() _describe -t commands 'envio help import commands' commands "$@" } (( $+functions[_envio__import_commands] )) || _envio__import_commands() { local commands; commands=() _describe -t commands 'envio import commands' commands "$@" } (( $+functions[_envio__help__launch_commands] )) || _envio__help__launch_commands() { local commands; commands=() _describe -t commands 'envio help launch commands' commands "$@" } (( $+functions[_envio__launch_commands] )) || _envio__launch_commands() { local commands; commands=() _describe -t commands 'envio launch commands' commands "$@" } (( $+functions[_envio__help__list_commands] )) || _envio__help__list_commands() { local commands; commands=() _describe -t commands 'envio help list commands' commands "$@" } (( $+functions[_envio__list_commands] )) || _envio__list_commands() { local commands; commands=() _describe -t commands 'envio list commands' commands "$@" } (( $+functions[_envio__help__load_commands] )) || _envio__help__load_commands() { local commands; commands=() _describe -t commands 'envio help load commands' commands "$@" } (( $+functions[_envio__load_commands] )) || _envio__load_commands() { local commands; commands=() _describe -t commands 'envio load commands' commands "$@" } (( $+functions[_envio__help__remove_commands] )) || _envio__help__remove_commands() { local commands; commands=() _describe -t commands 'envio help remove commands' commands "$@" } (( $+functions[_envio__remove_commands] )) || _envio__remove_commands() { local commands; commands=() _describe -t commands 'envio remove commands' commands "$@" } (( $+functions[_envio__help__unload_commands] )) || _envio__help__unload_commands() { local commands; commands=() _describe -t commands 'envio help unload commands' commands "$@" } (( $+functions[_envio__unload_commands] )) || _envio__unload_commands() { local commands; commands=() _describe -t commands 'envio unload commands' commands "$@" } (( $+functions[_envio__help__update_commands] )) || _envio__help__update_commands() { local commands; commands=() _describe -t commands 'envio help update commands' commands "$@" } (( $+functions[_envio__update_commands] )) || _envio__update_commands() { local commands; commands=() _describe -t commands 'envio update commands' commands "$@" } (( $+functions[_envio__help__version_commands] )) || _envio__help__version_commands() { local commands; commands=() _describe -t commands 'envio help version commands' commands "$@" } (( $+functions[_envio__version_commands] )) || _envio__version_commands() { local commands; commands=() _describe -t commands 'envio version commands' commands "$@" } if [ "$funcstack[1]" = "_envio" ]; then _envio "$@" else compdef _envio envio fi