From bb5cebd604c7e5f0441ca9f7061bb1d8c222d3d8 Mon Sep 17 00:00:00 2001 From: Amolith Date: Sun, 9 Mar 2025 18:19:46 -0600 Subject: [PATCH] Include completions --- dot_config/zsh/completions/_antidot.zsh | 6 + dot_config/zsh/completions/_atuin.zsh | 1297 +++++++++++++ dot_config/zsh/completions/_charm.zsh | 205 ++ dot_config/zsh/completions/_chezmoi.zsh | 212 ++ dot_config/zsh/completions/_exercism.zsh | 212 ++ dot_config/zsh/completions/_himalaya.zsh | 2240 ++++++++++++++++++++++ dot_config/zsh/completions/_klog.zsh | 2 + dot_config/zsh/completions/_starship.zsh | 1 + 8 files changed, 4175 insertions(+) create mode 100644 dot_config/zsh/completions/_antidot.zsh create mode 100644 dot_config/zsh/completions/_atuin.zsh create mode 100644 dot_config/zsh/completions/_charm.zsh create mode 100644 dot_config/zsh/completions/_chezmoi.zsh create mode 100644 dot_config/zsh/completions/_exercism.zsh create mode 100644 dot_config/zsh/completions/_himalaya.zsh create mode 100644 dot_config/zsh/completions/_klog.zsh create mode 100644 dot_config/zsh/completions/_starship.zsh diff --git a/dot_config/zsh/completions/_antidot.zsh b/dot_config/zsh/completions/_antidot.zsh new file mode 100644 index 0000000000000000000000000000000000000000..b3838813fbd4fd9b0caaf6b08dd1c8f59845ddff --- /dev/null +++ b/dot_config/zsh/completions/_antidot.zsh @@ -0,0 +1,6 @@ +export XDG_DATA_HOME="${XDG_DATA_HOME:-/home/amolith/.local/share}" +export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-/home/amolith/.config}" +export XDG_CACHE_HOME="${XDG_CACHE_HOME:-/home/amolith/.cache}" + +if [ -f "/home/amolith/.local/share/antidot/env.sh" ]; then source "/home/amolith/.local/share/antidot/env.sh"; fi +if [ -f "/home/amolith/.local/share/antidot/alias.sh" ]; then source "/home/amolith/.local/share/antidot/alias.sh"; fi diff --git a/dot_config/zsh/completions/_atuin.zsh b/dot_config/zsh/completions/_atuin.zsh new file mode 100644 index 0000000000000000000000000000000000000000..6474887fba5f7ac0be3ab227d858373761d67401 --- /dev/null +++ b/dot_config/zsh/completions/_atuin.zsh @@ -0,0 +1,1297 @@ +#compdef atuin + +autoload -U is-at-least + +_atuin() { + 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]' \ +'-V[Print version]' \ +'--version[Print version]' \ +":: :_atuin_commands" \ +"*::: :->atuin" \ +&& ret=0 + case $state in + (atuin) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:atuin-command-$line[1]:" + case $line[1] in + (history) +_arguments "${_arguments_options[@]}" \ +'-h[Print help]' \ +'--help[Print help]' \ +":: :_atuin__history_commands" \ +"*::: :->history" \ +&& ret=0 + + case $state in + (history) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:atuin-history-command-$line[1]:" + case $line[1] in + (start) +_arguments "${_arguments_options[@]}" \ +'-h[Print help]' \ +'--help[Print help]' \ +'*::command:' \ +&& ret=0 +;; +(end) +_arguments "${_arguments_options[@]}" \ +'-e+[]:EXIT: ' \ +'--exit=[]:EXIT: ' \ +'-h[Print help]' \ +'--help[Print help]' \ +':id:' \ +&& ret=0 +;; +(list) +_arguments "${_arguments_options[@]}" \ +'-f+[Available variables: {command}, {directory}, {duration}, {user}, {host} and {time}. Example: --format "{time} - \[{duration}\] - {directory}$\\t{command}"]:FORMAT: ' \ +'--format=[Available variables: {command}, {directory}, {duration}, {user}, {host} and {time}. Example: --format "{time} - \[{duration}\] - {directory}$\\t{command}"]:FORMAT: ' \ +'-c[]' \ +'--cwd[]' \ +'-s[]' \ +'--session[]' \ +'--human[]' \ +'--cmd-only[Show only the text of the command]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(last) +_arguments "${_arguments_options[@]}" \ +'-f+[Available variables: {command}, {directory}, {duration}, {user}, {host} and {time}. Example: --format "{time} - \[{duration}\] - {directory}$\\t{command}"]:FORMAT: ' \ +'--format=[Available variables: {command}, {directory}, {duration}, {user}, {host} and {time}. Example: --format "{time} - \[{duration}\] - {directory}$\\t{command}"]:FORMAT: ' \ +'--human[]' \ +'--cmd-only[Show only the text of the command]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" \ +":: :_atuin__history__help_commands" \ +"*::: :->help" \ +&& ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:atuin-history-help-command-$line[1]:" + case $line[1] in + (start) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(end) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(list) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(last) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +;; +(import) +_arguments "${_arguments_options[@]}" \ +'-h[Print help]' \ +'--help[Print help]' \ +":: :_atuin__import_commands" \ +"*::: :->import" \ +&& ret=0 + + case $state in + (import) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:atuin-import-command-$line[1]:" + case $line[1] in + (auto) +_arguments "${_arguments_options[@]}" \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(zsh) +_arguments "${_arguments_options[@]}" \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(zsh-hist-db) +_arguments "${_arguments_options[@]}" \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(bash) +_arguments "${_arguments_options[@]}" \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(resh) +_arguments "${_arguments_options[@]}" \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(fish) +_arguments "${_arguments_options[@]}" \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(nu) +_arguments "${_arguments_options[@]}" \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(nu-hist-db) +_arguments "${_arguments_options[@]}" \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" \ +":: :_atuin__import__help_commands" \ +"*::: :->help" \ +&& ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:atuin-import-help-command-$line[1]:" + case $line[1] in + (auto) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(zsh) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(zsh-hist-db) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(bash) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(resh) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(fish) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(nu) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(nu-hist-db) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +;; +(stats) +_arguments "${_arguments_options[@]}" \ +'-c+[How many top commands to list]:COUNT: ' \ +'--count=[How many top commands to list]:COUNT: ' \ +'-h[Print help]' \ +'--help[Print help]' \ +'*::period -- compute statistics for the specified period, leave blank for statistics since the beginning:' \ +&& ret=0 +;; +(search) +_arguments "${_arguments_options[@]}" \ +'-c+[Filter search result by directory]:CWD: ' \ +'--cwd=[Filter search result by directory]:CWD: ' \ +'--exclude-cwd=[Exclude directory from results]:EXCLUDE_CWD: ' \ +'-e+[Filter search result by exit code]:EXIT: ' \ +'--exit=[Filter search result by exit code]:EXIT: ' \ +'--exclude-exit=[Exclude results with this exit code]:EXCLUDE_EXIT: ' \ +'-b+[Only include results added before this date]:BEFORE: ' \ +'--before=[Only include results added before this date]:BEFORE: ' \ +'--after=[Only include results after this date]:AFTER: ' \ +'--limit=[How many entries to return at most]:LIMIT: ' \ +'--offset=[Offset from the start of the results]:OFFSET: ' \ +'--filter-mode=[Allow overriding filter mode over config]:FILTER_MODE:(global host session directory)' \ +'--search-mode=[Allow overriding search mode over config]:SEARCH_MODE:(prefix full-text fuzzy skim)' \ +'-f+[Available variables: {command}, {directory}, {duration}, {user}, {host}, {time}, {exit} and {relativetime}. Example: --format "{time} - \[{duration}\] - {directory}$\\t{command}"]:FORMAT: ' \ +'--format=[Available variables: {command}, {directory}, {duration}, {user}, {host}, {time}, {exit} and {relativetime}. Example: --format "{time} - \[{duration}\] - {directory}$\\t{command}"]:FORMAT: ' \ +'--inline-height=[Set the maximum number of lines Atuin'\''s interface should take up]:INLINE_HEIGHT: ' \ +'-i[Open interactive search UI]' \ +'--interactive[Open interactive search UI]' \ +'--shell-up-key-binding[Marker argument used to inform atuin that it was invoked from a shell up-key binding (hidden from help to avoid confusion)]' \ +'--human[Use human-readable formatting for time]' \ +'--cmd-only[Show only the text of the command]' \ +'--delete[Delete anything matching this query. Will not print out the match]' \ +'--delete-it-all[Delete EVERYTHING!]' \ +'-r[Reverse the order of results, oldest first]' \ +'--reverse[Reverse the order of results, oldest first]' \ +'-h[Print help]' \ +'--help[Print help]' \ +'*::query:' \ +&& ret=0 +;; +(sync) +_arguments "${_arguments_options[@]}" \ +'-f[Force re-download everything]' \ +'--force[Force re-download everything]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(login) +_arguments "${_arguments_options[@]}" \ +'-u+[]:USERNAME: ' \ +'--username=[]:USERNAME: ' \ +'-p+[]:PASSWORD: ' \ +'--password=[]:PASSWORD: ' \ +'-k+[The encryption key for your account]:KEY: ' \ +'--key=[The encryption key for your account]:KEY: ' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(logout) +_arguments "${_arguments_options[@]}" \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(register) +_arguments "${_arguments_options[@]}" \ +'-u+[]:USERNAME: ' \ +'--username=[]:USERNAME: ' \ +'-p+[]:PASSWORD: ' \ +'--password=[]:PASSWORD: ' \ +'-e+[]:EMAIL: ' \ +'--email=[]:EMAIL: ' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(key) +_arguments "${_arguments_options[@]}" \ +'--base64[Switch to base64 output of the key]' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(status) +_arguments "${_arguments_options[@]}" \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(account) +_arguments "${_arguments_options[@]}" \ +'-h[Print help]' \ +'--help[Print help]' \ +":: :_atuin__account_commands" \ +"*::: :->account" \ +&& ret=0 + + case $state in + (account) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:atuin-account-command-$line[1]:" + case $line[1] in + (login) +_arguments "${_arguments_options[@]}" \ +'-u+[]:USERNAME: ' \ +'--username=[]:USERNAME: ' \ +'-p+[]:PASSWORD: ' \ +'--password=[]:PASSWORD: ' \ +'-k+[The encryption key for your account]:KEY: ' \ +'--key=[The encryption key for your account]:KEY: ' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(register) +_arguments "${_arguments_options[@]}" \ +'-u+[]:USERNAME: ' \ +'--username=[]:USERNAME: ' \ +'-p+[]:PASSWORD: ' \ +'--password=[]:PASSWORD: ' \ +'-e+[]:EMAIL: ' \ +'--email=[]:EMAIL: ' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(logout) +_arguments "${_arguments_options[@]}" \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(delete) +_arguments "${_arguments_options[@]}" \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" \ +":: :_atuin__account__help_commands" \ +"*::: :->help" \ +&& ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:atuin-account-help-command-$line[1]:" + case $line[1] in + (login) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(register) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(logout) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(delete) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +;; +(server) +_arguments "${_arguments_options[@]}" \ +'-h[Print help]' \ +'--help[Print help]' \ +":: :_atuin__server_commands" \ +"*::: :->server" \ +&& ret=0 + + case $state in + (server) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:atuin-server-command-$line[1]:" + case $line[1] in + (start) +_arguments "${_arguments_options[@]}" \ +'--host=[The host address to bind]:HOST: ' \ +'-p+[The port to bind]:PORT: ' \ +'--port=[The port to bind]:PORT: ' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" \ +":: :_atuin__server__help_commands" \ +"*::: :->help" \ +&& ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:atuin-server-help-command-$line[1]:" + case $line[1] in + (start) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +;; +(init) +_arguments "${_arguments_options[@]}" \ +'--disable-ctrl-r[Disable the binding of CTRL-R to atuin]' \ +'--disable-up-arrow[Disable the binding of the Up Arrow key to atuin]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +':shell:((zsh\:"Zsh setup" +bash\:"Bash setup" +fish\:"Fish setup" +nu\:"Nu setup"))' \ +&& ret=0 +;; +(uuid) +_arguments "${_arguments_options[@]}" \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(contributors) +_arguments "${_arguments_options[@]}" \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(gen-completions) +_arguments "${_arguments_options[@]}" \ +'-s+[Set the shell for generating completions]:SHELL:(bash elvish fish powershell zsh)' \ +'--shell=[Set the shell for generating completions]:SHELL:(bash elvish fish powershell zsh)' \ +'-o+[Set the output directory]:OUT_DIR: ' \ +'--out-dir=[Set the output directory]:OUT_DIR: ' \ +'-h[Print help]' \ +'--help[Print help]' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" \ +":: :_atuin__help_commands" \ +"*::: :->help" \ +&& ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:atuin-help-command-$line[1]:" + case $line[1] in + (history) +_arguments "${_arguments_options[@]}" \ +":: :_atuin__help__history_commands" \ +"*::: :->history" \ +&& ret=0 + + case $state in + (history) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:atuin-help-history-command-$line[1]:" + case $line[1] in + (start) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(end) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(list) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(last) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; + esac + ;; +esac +;; +(import) +_arguments "${_arguments_options[@]}" \ +":: :_atuin__help__import_commands" \ +"*::: :->import" \ +&& ret=0 + + case $state in + (import) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:atuin-help-import-command-$line[1]:" + case $line[1] in + (auto) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(zsh) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(zsh-hist-db) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(bash) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(resh) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(fish) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(nu) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(nu-hist-db) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; + esac + ;; +esac +;; +(stats) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(search) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(sync) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(login) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(logout) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(register) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(key) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(status) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(account) +_arguments "${_arguments_options[@]}" \ +":: :_atuin__help__account_commands" \ +"*::: :->account" \ +&& ret=0 + + case $state in + (account) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:atuin-help-account-command-$line[1]:" + case $line[1] in + (login) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(register) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(logout) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(delete) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; + esac + ;; +esac +;; +(server) +_arguments "${_arguments_options[@]}" \ +":: :_atuin__help__server_commands" \ +"*::: :->server" \ +&& ret=0 + + case $state in + (server) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:atuin-help-server-command-$line[1]:" + case $line[1] in + (start) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; + esac + ;; +esac +;; +(init) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(uuid) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(contributors) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(gen-completions) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +} + +(( $+functions[_atuin_commands] )) || +_atuin_commands() { + local commands; commands=( +'history:Manipulate shell history' \ +'import:Import shell history from file' \ +'stats:Calculate statistics for your history' \ +'search:Interactive history search' \ +'sync:Sync with the configured server' \ +'login:Login to the configured server' \ +'logout:Log out' \ +'register:Register with the configured server' \ +'key:Print the encryption key for transfer to another machine' \ +'status:' \ +'account:' \ +'server:Start an atuin server' \ +'init:Output shell setup' \ +'uuid:Generate a UUID' \ +'contributors:' \ +'gen-completions:Generate shell completions' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'atuin commands' commands "$@" +} +(( $+functions[_atuin__account_commands] )) || +_atuin__account_commands() { + local commands; commands=( +'login:Login to the configured server' \ +'register:' \ +'logout:Log out' \ +'delete:' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'atuin account commands' commands "$@" +} +(( $+functions[_atuin__help__account_commands] )) || +_atuin__help__account_commands() { + local commands; commands=( +'login:Login to the configured server' \ +'register:' \ +'logout:Log out' \ +'delete:' \ + ) + _describe -t commands 'atuin help account commands' commands "$@" +} +(( $+functions[_atuin__help__import__auto_commands] )) || +_atuin__help__import__auto_commands() { + local commands; commands=() + _describe -t commands 'atuin help import auto commands' commands "$@" +} +(( $+functions[_atuin__import__auto_commands] )) || +_atuin__import__auto_commands() { + local commands; commands=() + _describe -t commands 'atuin import auto commands' commands "$@" +} +(( $+functions[_atuin__import__help__auto_commands] )) || +_atuin__import__help__auto_commands() { + local commands; commands=() + _describe -t commands 'atuin import help auto commands' commands "$@" +} +(( $+functions[_atuin__help__import__bash_commands] )) || +_atuin__help__import__bash_commands() { + local commands; commands=() + _describe -t commands 'atuin help import bash commands' commands "$@" +} +(( $+functions[_atuin__import__bash_commands] )) || +_atuin__import__bash_commands() { + local commands; commands=() + _describe -t commands 'atuin import bash commands' commands "$@" +} +(( $+functions[_atuin__import__help__bash_commands] )) || +_atuin__import__help__bash_commands() { + local commands; commands=() + _describe -t commands 'atuin import help bash commands' commands "$@" +} +(( $+functions[_atuin__contributors_commands] )) || +_atuin__contributors_commands() { + local commands; commands=() + _describe -t commands 'atuin contributors commands' commands "$@" +} +(( $+functions[_atuin__help__contributors_commands] )) || +_atuin__help__contributors_commands() { + local commands; commands=() + _describe -t commands 'atuin help contributors commands' commands "$@" +} +(( $+functions[_atuin__account__delete_commands] )) || +_atuin__account__delete_commands() { + local commands; commands=() + _describe -t commands 'atuin account delete commands' commands "$@" +} +(( $+functions[_atuin__account__help__delete_commands] )) || +_atuin__account__help__delete_commands() { + local commands; commands=() + _describe -t commands 'atuin account help delete commands' commands "$@" +} +(( $+functions[_atuin__help__account__delete_commands] )) || +_atuin__help__account__delete_commands() { + local commands; commands=() + _describe -t commands 'atuin help account delete commands' commands "$@" +} +(( $+functions[_atuin__help__history__end_commands] )) || +_atuin__help__history__end_commands() { + local commands; commands=() + _describe -t commands 'atuin help history end commands' commands "$@" +} +(( $+functions[_atuin__history__end_commands] )) || +_atuin__history__end_commands() { + local commands; commands=() + _describe -t commands 'atuin history end commands' commands "$@" +} +(( $+functions[_atuin__history__help__end_commands] )) || +_atuin__history__help__end_commands() { + local commands; commands=() + _describe -t commands 'atuin history help end commands' commands "$@" +} +(( $+functions[_atuin__help__import__fish_commands] )) || +_atuin__help__import__fish_commands() { + local commands; commands=() + _describe -t commands 'atuin help import fish commands' commands "$@" +} +(( $+functions[_atuin__import__fish_commands] )) || +_atuin__import__fish_commands() { + local commands; commands=() + _describe -t commands 'atuin import fish commands' commands "$@" +} +(( $+functions[_atuin__import__help__fish_commands] )) || +_atuin__import__help__fish_commands() { + local commands; commands=() + _describe -t commands 'atuin import help fish commands' commands "$@" +} +(( $+functions[_atuin__gen-completions_commands] )) || +_atuin__gen-completions_commands() { + local commands; commands=() + _describe -t commands 'atuin gen-completions commands' commands "$@" +} +(( $+functions[_atuin__help__gen-completions_commands] )) || +_atuin__help__gen-completions_commands() { + local commands; commands=() + _describe -t commands 'atuin help gen-completions commands' commands "$@" +} +(( $+functions[_atuin__account__help_commands] )) || +_atuin__account__help_commands() { + local commands; commands=( +'login:Login to the configured server' \ +'register:' \ +'logout:Log out' \ +'delete:' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'atuin account help commands' commands "$@" +} +(( $+functions[_atuin__account__help__help_commands] )) || +_atuin__account__help__help_commands() { + local commands; commands=() + _describe -t commands 'atuin account help help commands' commands "$@" +} +(( $+functions[_atuin__help_commands] )) || +_atuin__help_commands() { + local commands; commands=( +'history:Manipulate shell history' \ +'import:Import shell history from file' \ +'stats:Calculate statistics for your history' \ +'search:Interactive history search' \ +'sync:Sync with the configured server' \ +'login:Login to the configured server' \ +'logout:Log out' \ +'register:Register with the configured server' \ +'key:Print the encryption key for transfer to another machine' \ +'status:' \ +'account:' \ +'server:Start an atuin server' \ +'init:Output shell setup' \ +'uuid:Generate a UUID' \ +'contributors:' \ +'gen-completions:Generate shell completions' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'atuin help commands' commands "$@" +} +(( $+functions[_atuin__help__help_commands] )) || +_atuin__help__help_commands() { + local commands; commands=() + _describe -t commands 'atuin help help commands' commands "$@" +} +(( $+functions[_atuin__history__help_commands] )) || +_atuin__history__help_commands() { + local commands; commands=( +'start:Begins a new command in the history' \ +'end:Finishes a new command in the history (adds time, exit code)' \ +'list:List all items in history' \ +'last:Get the last command ran' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'atuin history help commands' commands "$@" +} +(( $+functions[_atuin__history__help__help_commands] )) || +_atuin__history__help__help_commands() { + local commands; commands=() + _describe -t commands 'atuin history help help commands' commands "$@" +} +(( $+functions[_atuin__import__help_commands] )) || +_atuin__import__help_commands() { + local commands; commands=( +'auto:Import history for the current shell' \ +'zsh:Import history from the zsh history file' \ +'zsh-hist-db:Import history from the zsh history file' \ +'bash:Import history from the bash history file' \ +'resh:Import history from the resh history file' \ +'fish:Import history from the fish history file' \ +'nu:Import history from the nu history file' \ +'nu-hist-db:Import history from the nu history file' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'atuin import help commands' commands "$@" +} +(( $+functions[_atuin__import__help__help_commands] )) || +_atuin__import__help__help_commands() { + local commands; commands=() + _describe -t commands 'atuin import help help commands' commands "$@" +} +(( $+functions[_atuin__server__help_commands] )) || +_atuin__server__help_commands() { + local commands; commands=( +'start:Start the server' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'atuin server help commands' commands "$@" +} +(( $+functions[_atuin__server__help__help_commands] )) || +_atuin__server__help__help_commands() { + local commands; commands=() + _describe -t commands 'atuin server help help commands' commands "$@" +} +(( $+functions[_atuin__help__history_commands] )) || +_atuin__help__history_commands() { + local commands; commands=( +'start:Begins a new command in the history' \ +'end:Finishes a new command in the history (adds time, exit code)' \ +'list:List all items in history' \ +'last:Get the last command ran' \ + ) + _describe -t commands 'atuin help history commands' commands "$@" +} +(( $+functions[_atuin__history_commands] )) || +_atuin__history_commands() { + local commands; commands=( +'start:Begins a new command in the history' \ +'end:Finishes a new command in the history (adds time, exit code)' \ +'list:List all items in history' \ +'last:Get the last command ran' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'atuin history commands' commands "$@" +} +(( $+functions[_atuin__help__import_commands] )) || +_atuin__help__import_commands() { + local commands; commands=( +'auto:Import history for the current shell' \ +'zsh:Import history from the zsh history file' \ +'zsh-hist-db:Import history from the zsh history file' \ +'bash:Import history from the bash history file' \ +'resh:Import history from the resh history file' \ +'fish:Import history from the fish history file' \ +'nu:Import history from the nu history file' \ +'nu-hist-db:Import history from the nu history file' \ + ) + _describe -t commands 'atuin help import commands' commands "$@" +} +(( $+functions[_atuin__import_commands] )) || +_atuin__import_commands() { + local commands; commands=( +'auto:Import history for the current shell' \ +'zsh:Import history from the zsh history file' \ +'zsh-hist-db:Import history from the zsh history file' \ +'bash:Import history from the bash history file' \ +'resh:Import history from the resh history file' \ +'fish:Import history from the fish history file' \ +'nu:Import history from the nu history file' \ +'nu-hist-db:Import history from the nu history file' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'atuin import commands' commands "$@" +} +(( $+functions[_atuin__help__init_commands] )) || +_atuin__help__init_commands() { + local commands; commands=() + _describe -t commands 'atuin help init commands' commands "$@" +} +(( $+functions[_atuin__init_commands] )) || +_atuin__init_commands() { + local commands; commands=() + _describe -t commands 'atuin init commands' commands "$@" +} +(( $+functions[_atuin__help__key_commands] )) || +_atuin__help__key_commands() { + local commands; commands=() + _describe -t commands 'atuin help key commands' commands "$@" +} +(( $+functions[_atuin__key_commands] )) || +_atuin__key_commands() { + local commands; commands=() + _describe -t commands 'atuin key commands' commands "$@" +} +(( $+functions[_atuin__help__history__last_commands] )) || +_atuin__help__history__last_commands() { + local commands; commands=() + _describe -t commands 'atuin help history last commands' commands "$@" +} +(( $+functions[_atuin__history__help__last_commands] )) || +_atuin__history__help__last_commands() { + local commands; commands=() + _describe -t commands 'atuin history help last commands' commands "$@" +} +(( $+functions[_atuin__history__last_commands] )) || +_atuin__history__last_commands() { + local commands; commands=() + _describe -t commands 'atuin history last commands' commands "$@" +} +(( $+functions[_atuin__help__history__list_commands] )) || +_atuin__help__history__list_commands() { + local commands; commands=() + _describe -t commands 'atuin help history list commands' commands "$@" +} +(( $+functions[_atuin__history__help__list_commands] )) || +_atuin__history__help__list_commands() { + local commands; commands=() + _describe -t commands 'atuin history help list commands' commands "$@" +} +(( $+functions[_atuin__history__list_commands] )) || +_atuin__history__list_commands() { + local commands; commands=() + _describe -t commands 'atuin history list commands' commands "$@" +} +(( $+functions[_atuin__account__help__login_commands] )) || +_atuin__account__help__login_commands() { + local commands; commands=() + _describe -t commands 'atuin account help login commands' commands "$@" +} +(( $+functions[_atuin__account__login_commands] )) || +_atuin__account__login_commands() { + local commands; commands=() + _describe -t commands 'atuin account login commands' commands "$@" +} +(( $+functions[_atuin__help__account__login_commands] )) || +_atuin__help__account__login_commands() { + local commands; commands=() + _describe -t commands 'atuin help account login commands' commands "$@" +} +(( $+functions[_atuin__help__login_commands] )) || +_atuin__help__login_commands() { + local commands; commands=() + _describe -t commands 'atuin help login commands' commands "$@" +} +(( $+functions[_atuin__login_commands] )) || +_atuin__login_commands() { + local commands; commands=() + _describe -t commands 'atuin login commands' commands "$@" +} +(( $+functions[_atuin__account__help__logout_commands] )) || +_atuin__account__help__logout_commands() { + local commands; commands=() + _describe -t commands 'atuin account help logout commands' commands "$@" +} +(( $+functions[_atuin__account__logout_commands] )) || +_atuin__account__logout_commands() { + local commands; commands=() + _describe -t commands 'atuin account logout commands' commands "$@" +} +(( $+functions[_atuin__help__account__logout_commands] )) || +_atuin__help__account__logout_commands() { + local commands; commands=() + _describe -t commands 'atuin help account logout commands' commands "$@" +} +(( $+functions[_atuin__help__logout_commands] )) || +_atuin__help__logout_commands() { + local commands; commands=() + _describe -t commands 'atuin help logout commands' commands "$@" +} +(( $+functions[_atuin__logout_commands] )) || +_atuin__logout_commands() { + local commands; commands=() + _describe -t commands 'atuin logout commands' commands "$@" +} +(( $+functions[_atuin__help__import__nu_commands] )) || +_atuin__help__import__nu_commands() { + local commands; commands=() + _describe -t commands 'atuin help import nu commands' commands "$@" +} +(( $+functions[_atuin__import__help__nu_commands] )) || +_atuin__import__help__nu_commands() { + local commands; commands=() + _describe -t commands 'atuin import help nu commands' commands "$@" +} +(( $+functions[_atuin__import__nu_commands] )) || +_atuin__import__nu_commands() { + local commands; commands=() + _describe -t commands 'atuin import nu commands' commands "$@" +} +(( $+functions[_atuin__help__import__nu-hist-db_commands] )) || +_atuin__help__import__nu-hist-db_commands() { + local commands; commands=() + _describe -t commands 'atuin help import nu-hist-db commands' commands "$@" +} +(( $+functions[_atuin__import__help__nu-hist-db_commands] )) || +_atuin__import__help__nu-hist-db_commands() { + local commands; commands=() + _describe -t commands 'atuin import help nu-hist-db commands' commands "$@" +} +(( $+functions[_atuin__import__nu-hist-db_commands] )) || +_atuin__import__nu-hist-db_commands() { + local commands; commands=() + _describe -t commands 'atuin import nu-hist-db commands' commands "$@" +} +(( $+functions[_atuin__account__help__register_commands] )) || +_atuin__account__help__register_commands() { + local commands; commands=() + _describe -t commands 'atuin account help register commands' commands "$@" +} +(( $+functions[_atuin__account__register_commands] )) || +_atuin__account__register_commands() { + local commands; commands=() + _describe -t commands 'atuin account register commands' commands "$@" +} +(( $+functions[_atuin__help__account__register_commands] )) || +_atuin__help__account__register_commands() { + local commands; commands=() + _describe -t commands 'atuin help account register commands' commands "$@" +} +(( $+functions[_atuin__help__register_commands] )) || +_atuin__help__register_commands() { + local commands; commands=() + _describe -t commands 'atuin help register commands' commands "$@" +} +(( $+functions[_atuin__register_commands] )) || +_atuin__register_commands() { + local commands; commands=() + _describe -t commands 'atuin register commands' commands "$@" +} +(( $+functions[_atuin__help__import__resh_commands] )) || +_atuin__help__import__resh_commands() { + local commands; commands=() + _describe -t commands 'atuin help import resh commands' commands "$@" +} +(( $+functions[_atuin__import__help__resh_commands] )) || +_atuin__import__help__resh_commands() { + local commands; commands=() + _describe -t commands 'atuin import help resh commands' commands "$@" +} +(( $+functions[_atuin__import__resh_commands] )) || +_atuin__import__resh_commands() { + local commands; commands=() + _describe -t commands 'atuin import resh commands' commands "$@" +} +(( $+functions[_atuin__help__search_commands] )) || +_atuin__help__search_commands() { + local commands; commands=() + _describe -t commands 'atuin help search commands' commands "$@" +} +(( $+functions[_atuin__search_commands] )) || +_atuin__search_commands() { + local commands; commands=() + _describe -t commands 'atuin search commands' commands "$@" +} +(( $+functions[_atuin__help__server_commands] )) || +_atuin__help__server_commands() { + local commands; commands=( +'start:Start the server' \ + ) + _describe -t commands 'atuin help server commands' commands "$@" +} +(( $+functions[_atuin__server_commands] )) || +_atuin__server_commands() { + local commands; commands=( +'start:Start the server' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'atuin server commands' commands "$@" +} +(( $+functions[_atuin__help__history__start_commands] )) || +_atuin__help__history__start_commands() { + local commands; commands=() + _describe -t commands 'atuin help history start commands' commands "$@" +} +(( $+functions[_atuin__help__server__start_commands] )) || +_atuin__help__server__start_commands() { + local commands; commands=() + _describe -t commands 'atuin help server start commands' commands "$@" +} +(( $+functions[_atuin__history__help__start_commands] )) || +_atuin__history__help__start_commands() { + local commands; commands=() + _describe -t commands 'atuin history help start commands' commands "$@" +} +(( $+functions[_atuin__history__start_commands] )) || +_atuin__history__start_commands() { + local commands; commands=() + _describe -t commands 'atuin history start commands' commands "$@" +} +(( $+functions[_atuin__server__help__start_commands] )) || +_atuin__server__help__start_commands() { + local commands; commands=() + _describe -t commands 'atuin server help start commands' commands "$@" +} +(( $+functions[_atuin__server__start_commands] )) || +_atuin__server__start_commands() { + local commands; commands=() + _describe -t commands 'atuin server start commands' commands "$@" +} +(( $+functions[_atuin__help__stats_commands] )) || +_atuin__help__stats_commands() { + local commands; commands=() + _describe -t commands 'atuin help stats commands' commands "$@" +} +(( $+functions[_atuin__stats_commands] )) || +_atuin__stats_commands() { + local commands; commands=() + _describe -t commands 'atuin stats commands' commands "$@" +} +(( $+functions[_atuin__help__status_commands] )) || +_atuin__help__status_commands() { + local commands; commands=() + _describe -t commands 'atuin help status commands' commands "$@" +} +(( $+functions[_atuin__status_commands] )) || +_atuin__status_commands() { + local commands; commands=() + _describe -t commands 'atuin status commands' commands "$@" +} +(( $+functions[_atuin__help__sync_commands] )) || +_atuin__help__sync_commands() { + local commands; commands=() + _describe -t commands 'atuin help sync commands' commands "$@" +} +(( $+functions[_atuin__sync_commands] )) || +_atuin__sync_commands() { + local commands; commands=() + _describe -t commands 'atuin sync commands' commands "$@" +} +(( $+functions[_atuin__help__uuid_commands] )) || +_atuin__help__uuid_commands() { + local commands; commands=() + _describe -t commands 'atuin help uuid commands' commands "$@" +} +(( $+functions[_atuin__uuid_commands] )) || +_atuin__uuid_commands() { + local commands; commands=() + _describe -t commands 'atuin uuid commands' commands "$@" +} +(( $+functions[_atuin__help__import__zsh_commands] )) || +_atuin__help__import__zsh_commands() { + local commands; commands=() + _describe -t commands 'atuin help import zsh commands' commands "$@" +} +(( $+functions[_atuin__import__help__zsh_commands] )) || +_atuin__import__help__zsh_commands() { + local commands; commands=() + _describe -t commands 'atuin import help zsh commands' commands "$@" +} +(( $+functions[_atuin__import__zsh_commands] )) || +_atuin__import__zsh_commands() { + local commands; commands=() + _describe -t commands 'atuin import zsh commands' commands "$@" +} +(( $+functions[_atuin__help__import__zsh-hist-db_commands] )) || +_atuin__help__import__zsh-hist-db_commands() { + local commands; commands=() + _describe -t commands 'atuin help import zsh-hist-db commands' commands "$@" +} +(( $+functions[_atuin__import__help__zsh-hist-db_commands] )) || +_atuin__import__help__zsh-hist-db_commands() { + local commands; commands=() + _describe -t commands 'atuin import help zsh-hist-db commands' commands "$@" +} +(( $+functions[_atuin__import__zsh-hist-db_commands] )) || +_atuin__import__zsh-hist-db_commands() { + local commands; commands=() + _describe -t commands 'atuin import zsh-hist-db commands' commands "$@" +} + +if [ "$funcstack[1]" = "_atuin" ]; then + _atuin "$@" +else + compdef _atuin atuin +fi diff --git a/dot_config/zsh/completions/_charm.zsh b/dot_config/zsh/completions/_charm.zsh new file mode 100644 index 0000000000000000000000000000000000000000..a329d471e2ba8d083e4870f5a2a1e56a141198e4 --- /dev/null +++ b/dot_config/zsh/completions/_charm.zsh @@ -0,0 +1,205 @@ +#compdef charm + +# zsh completion for charm -*- shell-script -*- + +__charm_debug() +{ + local file="$BASH_COMP_DEBUG_FILE" + if [[ -n ${file} ]]; then + echo "$*" >> "${file}" + fi +} + +_charm() +{ + local shellCompDirectiveError=1 + local shellCompDirectiveNoSpace=2 + local shellCompDirectiveNoFileComp=4 + local shellCompDirectiveFilterFileExt=8 + local shellCompDirectiveFilterDirs=16 + + local lastParam lastChar flagPrefix requestComp out directive comp lastComp noSpace + local -a completions + + __charm_debug "\n========= starting completion logic ==========" + __charm_debug "CURRENT: ${CURRENT}, words[*]: ${words[*]}" + + # The user could have moved the cursor backwards on the command-line. + # We need to trigger completion from the $CURRENT location, so we need + # to truncate the command-line ($words) up to the $CURRENT location. + # (We cannot use $CURSOR as its value does not work when a command is an alias.) + words=("${=words[1,CURRENT]}") + __charm_debug "Truncated words[*]: ${words[*]}," + + lastParam=${words[-1]} + lastChar=${lastParam[-1]} + __charm_debug "lastParam: ${lastParam}, lastChar: ${lastChar}" + + # For zsh, when completing a flag with an = (e.g., charm -n=) + # completions must be prefixed with the flag + setopt local_options BASH_REMATCH + if [[ "${lastParam}" =~ '-.*=' ]]; then + # We are dealing with a flag with an = + flagPrefix="-P ${BASH_REMATCH}" + fi + + # Prepare the command to obtain completions + requestComp="${words[1]} __complete ${words[2,-1]}" + if [ "${lastChar}" = "" ]; then + # If the last parameter is complete (there is a space following it) + # We add an extra empty parameter so we can indicate this to the go completion code. + __charm_debug "Adding extra empty parameter" + requestComp="${requestComp} \"\"" + fi + + __charm_debug "About to call: eval ${requestComp}" + + # Use eval to handle any environment variables and such + out=$(eval ${requestComp} 2>/dev/null) + __charm_debug "completion output: ${out}" + + # Extract the directive integer following a : from the last line + local lastLine + while IFS='\n' read -r line; do + lastLine=${line} + done < <(printf "%s\n" "${out[@]}") + __charm_debug "last line: ${lastLine}" + + if [ "${lastLine[1]}" = : ]; then + directive=${lastLine[2,-1]} + # Remove the directive including the : and the newline + local suffix + (( suffix=${#lastLine}+2)) + out=${out[1,-$suffix]} + else + # There is no directive specified. Leave $out as is. + __charm_debug "No directive found. Setting do default" + directive=0 + fi + + __charm_debug "directive: ${directive}" + __charm_debug "completions: ${out}" + __charm_debug "flagPrefix: ${flagPrefix}" + + if [ $((directive & shellCompDirectiveError)) -ne 0 ]; then + __charm_debug "Completion received error. Ignoring completions." + return + fi + + local activeHelpMarker="_activeHelp_ " + local endIndex=${#activeHelpMarker} + local startIndex=$((${#activeHelpMarker}+1)) + local hasActiveHelp=0 + while IFS='\n' read -r comp; do + # Check if this is an activeHelp statement (i.e., prefixed with $activeHelpMarker) + if [ "${comp[1,$endIndex]}" = "$activeHelpMarker" ];then + __charm_debug "ActiveHelp found: $comp" + comp="${comp[$startIndex,-1]}" + if [ -n "$comp" ]; then + compadd -x "${comp}" + __charm_debug "ActiveHelp will need delimiter" + hasActiveHelp=1 + fi + + continue + fi + + if [ -n "$comp" ]; then + # If requested, completions are returned with a description. + # The description is preceded by a TAB character. + # For zsh's _describe, we need to use a : instead of a TAB. + # We first need to escape any : as part of the completion itself. + comp=${comp//:/\\:} + + local tab="$(printf '\t')" + comp=${comp//$tab/:} + + __charm_debug "Adding completion: ${comp}" + completions+=${comp} + lastComp=$comp + fi + done < <(printf "%s\n" "${out[@]}") + + # Add a delimiter after the activeHelp statements, but only if: + # - there are completions following the activeHelp statements, or + # - file completion will be performed (so there will be choices after the activeHelp) + if [ $hasActiveHelp -eq 1 ]; then + if [ ${#completions} -ne 0 ] || [ $((directive & shellCompDirectiveNoFileComp)) -eq 0 ]; then + __charm_debug "Adding activeHelp delimiter" + compadd -x "--" + hasActiveHelp=0 + fi + fi + + if [ $((directive & shellCompDirectiveNoSpace)) -ne 0 ]; then + __charm_debug "Activating nospace." + noSpace="-S ''" + fi + + if [ $((directive & shellCompDirectiveFilterFileExt)) -ne 0 ]; then + # File extension filtering + local filteringCmd + filteringCmd='_files' + for filter in ${completions[@]}; do + if [ ${filter[1]} != '*' ]; then + # zsh requires a glob pattern to do file filtering + filter="\*.$filter" + fi + filteringCmd+=" -g $filter" + done + filteringCmd+=" ${flagPrefix}" + + __charm_debug "File filtering command: $filteringCmd" + _arguments '*:filename:'"$filteringCmd" + elif [ $((directive & shellCompDirectiveFilterDirs)) -ne 0 ]; then + # File completion for directories only + local subdir + subdir="${completions[1]}" + if [ -n "$subdir" ]; then + __charm_debug "Listing directories in $subdir" + pushd "${subdir}" >/dev/null 2>&1 + else + __charm_debug "Listing directories in ." + fi + + local result + _arguments '*:dirname:_files -/'" ${flagPrefix}" + result=$? + if [ -n "$subdir" ]; then + popd >/dev/null 2>&1 + fi + return $result + else + __charm_debug "Calling _describe" + if eval _describe "completions" completions $flagPrefix $noSpace; then + __charm_debug "_describe found some completions" + + # Return the success of having called _describe + return 0 + else + __charm_debug "_describe did not find completions." + __charm_debug "Checking if we should do file completion." + if [ $((directive & shellCompDirectiveNoFileComp)) -ne 0 ]; then + __charm_debug "deactivating file completion" + + # We must return an error code here to let zsh know that there were no + # completions found by _describe; this is what will trigger other + # matching algorithms to attempt to find completions. + # For example zsh can match letters in the middle of words. + return 1 + else + # Perform file completion + __charm_debug "Activating file completion" + + # We must return the result of this command, so it must be the + # last command, or else we must store its result to return it. + _arguments '*:filename:_files'" ${flagPrefix}" + fi + fi + fi +} + +# don't run the completion function when being source-ed or eval-ed +if [ "$funcstack[1]" = "_charm" ]; then + _charm +fi diff --git a/dot_config/zsh/completions/_chezmoi.zsh b/dot_config/zsh/completions/_chezmoi.zsh new file mode 100644 index 0000000000000000000000000000000000000000..46af48dcd031aa891d24f005356d9eef3763f638 --- /dev/null +++ b/dot_config/zsh/completions/_chezmoi.zsh @@ -0,0 +1,212 @@ +#compdef chezmoi +compdef _chezmoi chezmoi + +# zsh completion for chezmoi -*- shell-script -*- + +__chezmoi_debug() +{ + local file="$BASH_COMP_DEBUG_FILE" + if [[ -n ${file} ]]; then + echo "$*" >> "${file}" + fi +} + +_chezmoi() +{ + local shellCompDirectiveError=1 + local shellCompDirectiveNoSpace=2 + local shellCompDirectiveNoFileComp=4 + local shellCompDirectiveFilterFileExt=8 + local shellCompDirectiveFilterDirs=16 + local shellCompDirectiveKeepOrder=32 + + local lastParam lastChar flagPrefix requestComp out directive comp lastComp noSpace keepOrder + local -a completions + + __chezmoi_debug "\n========= starting completion logic ==========" + __chezmoi_debug "CURRENT: ${CURRENT}, words[*]: ${words[*]}" + + # The user could have moved the cursor backwards on the command-line. + # We need to trigger completion from the $CURRENT location, so we need + # to truncate the command-line ($words) up to the $CURRENT location. + # (We cannot use $CURSOR as its value does not work when a command is an alias.) + words=("${=words[1,CURRENT]}") + __chezmoi_debug "Truncated words[*]: ${words[*]}," + + lastParam=${words[-1]} + lastChar=${lastParam[-1]} + __chezmoi_debug "lastParam: ${lastParam}, lastChar: ${lastChar}" + + # For zsh, when completing a flag with an = (e.g., chezmoi -n=) + # completions must be prefixed with the flag + setopt local_options BASH_REMATCH + if [[ "${lastParam}" =~ '-.*=' ]]; then + # We are dealing with a flag with an = + flagPrefix="-P ${BASH_REMATCH}" + fi + + # Prepare the command to obtain completions + requestComp="${words[1]} __complete ${words[2,-1]}" + if [ "${lastChar}" = "" ]; then + # If the last parameter is complete (there is a space following it) + # We add an extra empty parameter so we can indicate this to the go completion code. + __chezmoi_debug "Adding extra empty parameter" + requestComp="${requestComp} \"\"" + fi + + __chezmoi_debug "About to call: eval ${requestComp}" + + # Use eval to handle any environment variables and such + out=$(eval ${requestComp} 2>/dev/null) + __chezmoi_debug "completion output: ${out}" + + # Extract the directive integer following a : from the last line + local lastLine + while IFS='\n' read -r line; do + lastLine=${line} + done < <(printf "%s\n" "${out[@]}") + __chezmoi_debug "last line: ${lastLine}" + + if [ "${lastLine[1]}" = : ]; then + directive=${lastLine[2,-1]} + # Remove the directive including the : and the newline + local suffix + (( suffix=${#lastLine}+2)) + out=${out[1,-$suffix]} + else + # There is no directive specified. Leave $out as is. + __chezmoi_debug "No directive found. Setting do default" + directive=0 + fi + + __chezmoi_debug "directive: ${directive}" + __chezmoi_debug "completions: ${out}" + __chezmoi_debug "flagPrefix: ${flagPrefix}" + + if [ $((directive & shellCompDirectiveError)) -ne 0 ]; then + __chezmoi_debug "Completion received error. Ignoring completions." + return + fi + + local activeHelpMarker="_activeHelp_ " + local endIndex=${#activeHelpMarker} + local startIndex=$((${#activeHelpMarker}+1)) + local hasActiveHelp=0 + while IFS='\n' read -r comp; do + # Check if this is an activeHelp statement (i.e., prefixed with $activeHelpMarker) + if [ "${comp[1,$endIndex]}" = "$activeHelpMarker" ];then + __chezmoi_debug "ActiveHelp found: $comp" + comp="${comp[$startIndex,-1]}" + if [ -n "$comp" ]; then + compadd -x "${comp}" + __chezmoi_debug "ActiveHelp will need delimiter" + hasActiveHelp=1 + fi + + continue + fi + + if [ -n "$comp" ]; then + # If requested, completions are returned with a description. + # The description is preceded by a TAB character. + # For zsh's _describe, we need to use a : instead of a TAB. + # We first need to escape any : as part of the completion itself. + comp=${comp//:/\\:} + + local tab="$(printf '\t')" + comp=${comp//$tab/:} + + __chezmoi_debug "Adding completion: ${comp}" + completions+=${comp} + lastComp=$comp + fi + done < <(printf "%s\n" "${out[@]}") + + # Add a delimiter after the activeHelp statements, but only if: + # - there are completions following the activeHelp statements, or + # - file completion will be performed (so there will be choices after the activeHelp) + if [ $hasActiveHelp -eq 1 ]; then + if [ ${#completions} -ne 0 ] || [ $((directive & shellCompDirectiveNoFileComp)) -eq 0 ]; then + __chezmoi_debug "Adding activeHelp delimiter" + compadd -x "--" + hasActiveHelp=0 + fi + fi + + if [ $((directive & shellCompDirectiveNoSpace)) -ne 0 ]; then + __chezmoi_debug "Activating nospace." + noSpace="-S ''" + fi + + if [ $((directive & shellCompDirectiveKeepOrder)) -ne 0 ]; then + __chezmoi_debug "Activating keep order." + keepOrder="-V" + fi + + if [ $((directive & shellCompDirectiveFilterFileExt)) -ne 0 ]; then + # File extension filtering + local filteringCmd + filteringCmd='_files' + for filter in ${completions[@]}; do + if [ ${filter[1]} != '*' ]; then + # zsh requires a glob pattern to do file filtering + filter="\*.$filter" + fi + filteringCmd+=" -g $filter" + done + filteringCmd+=" ${flagPrefix}" + + __chezmoi_debug "File filtering command: $filteringCmd" + _arguments '*:filename:'"$filteringCmd" + elif [ $((directive & shellCompDirectiveFilterDirs)) -ne 0 ]; then + # File completion for directories only + local subdir + subdir="${completions[1]}" + if [ -n "$subdir" ]; then + __chezmoi_debug "Listing directories in $subdir" + pushd "${subdir}" >/dev/null 2>&1 + else + __chezmoi_debug "Listing directories in ." + fi + + local result + _arguments '*:dirname:_files -/'" ${flagPrefix}" + result=$? + if [ -n "$subdir" ]; then + popd >/dev/null 2>&1 + fi + return $result + else + __chezmoi_debug "Calling _describe" + if eval _describe $keepOrder "completions" completions $flagPrefix $noSpace; then + __chezmoi_debug "_describe found some completions" + + # Return the success of having called _describe + return 0 + else + __chezmoi_debug "_describe did not find completions." + __chezmoi_debug "Checking if we should do file completion." + if [ $((directive & shellCompDirectiveNoFileComp)) -ne 0 ]; then + __chezmoi_debug "deactivating file completion" + + # We must return an error code here to let zsh know that there were no + # completions found by _describe; this is what will trigger other + # matching algorithms to attempt to find completions. + # For example zsh can match letters in the middle of words. + return 1 + else + # Perform file completion + __chezmoi_debug "Activating file completion" + + # We must return the result of this command, so it must be the + # last command, or else we must store its result to return it. + _arguments '*:filename:_files'" ${flagPrefix}" + fi + fi + fi +} + +# don't run the completion function when being source-ed or eval-ed +if [ "$funcstack[1]" = "_chezmoi" ]; then + _chezmoi +fi diff --git a/dot_config/zsh/completions/_exercism.zsh b/dot_config/zsh/completions/_exercism.zsh new file mode 100644 index 0000000000000000000000000000000000000000..e6cb2686c93db8df55e995455251ad6cf18911c0 --- /dev/null +++ b/dot_config/zsh/completions/_exercism.zsh @@ -0,0 +1,212 @@ +#compdef exercism +compdef _exercism exercism + +# zsh completion for exercism -*- shell-script -*- + +__exercism_debug() +{ + local file="$BASH_COMP_DEBUG_FILE" + if [[ -n ${file} ]]; then + echo "$*" >> "${file}" + fi +} + +_exercism() +{ + local shellCompDirectiveError=1 + local shellCompDirectiveNoSpace=2 + local shellCompDirectiveNoFileComp=4 + local shellCompDirectiveFilterFileExt=8 + local shellCompDirectiveFilterDirs=16 + local shellCompDirectiveKeepOrder=32 + + local lastParam lastChar flagPrefix requestComp out directive comp lastComp noSpace keepOrder + local -a completions + + __exercism_debug "\n========= starting completion logic ==========" + __exercism_debug "CURRENT: ${CURRENT}, words[*]: ${words[*]}" + + # The user could have moved the cursor backwards on the command-line. + # We need to trigger completion from the $CURRENT location, so we need + # to truncate the command-line ($words) up to the $CURRENT location. + # (We cannot use $CURSOR as its value does not work when a command is an alias.) + words=("${=words[1,CURRENT]}") + __exercism_debug "Truncated words[*]: ${words[*]}," + + lastParam=${words[-1]} + lastChar=${lastParam[-1]} + __exercism_debug "lastParam: ${lastParam}, lastChar: ${lastChar}" + + # For zsh, when completing a flag with an = (e.g., exercism -n=) + # completions must be prefixed with the flag + setopt local_options BASH_REMATCH + if [[ "${lastParam}" =~ '-.*=' ]]; then + # We are dealing with a flag with an = + flagPrefix="-P ${BASH_REMATCH}" + fi + + # Prepare the command to obtain completions + requestComp="${words[1]} __complete ${words[2,-1]}" + if [ "${lastChar}" = "" ]; then + # If the last parameter is complete (there is a space following it) + # We add an extra empty parameter so we can indicate this to the go completion code. + __exercism_debug "Adding extra empty parameter" + requestComp="${requestComp} \"\"" + fi + + __exercism_debug "About to call: eval ${requestComp}" + + # Use eval to handle any environment variables and such + out=$(eval ${requestComp} 2>/dev/null) + __exercism_debug "completion output: ${out}" + + # Extract the directive integer following a : from the last line + local lastLine + while IFS='\n' read -r line; do + lastLine=${line} + done < <(printf "%s\n" "${out[@]}") + __exercism_debug "last line: ${lastLine}" + + if [ "${lastLine[1]}" = : ]; then + directive=${lastLine[2,-1]} + # Remove the directive including the : and the newline + local suffix + (( suffix=${#lastLine}+2)) + out=${out[1,-$suffix]} + else + # There is no directive specified. Leave $out as is. + __exercism_debug "No directive found. Setting do default" + directive=0 + fi + + __exercism_debug "directive: ${directive}" + __exercism_debug "completions: ${out}" + __exercism_debug "flagPrefix: ${flagPrefix}" + + if [ $((directive & shellCompDirectiveError)) -ne 0 ]; then + __exercism_debug "Completion received error. Ignoring completions." + return + fi + + local activeHelpMarker="_activeHelp_ " + local endIndex=${#activeHelpMarker} + local startIndex=$((${#activeHelpMarker}+1)) + local hasActiveHelp=0 + while IFS='\n' read -r comp; do + # Check if this is an activeHelp statement (i.e., prefixed with $activeHelpMarker) + if [ "${comp[1,$endIndex]}" = "$activeHelpMarker" ];then + __exercism_debug "ActiveHelp found: $comp" + comp="${comp[$startIndex,-1]}" + if [ -n "$comp" ]; then + compadd -x "${comp}" + __exercism_debug "ActiveHelp will need delimiter" + hasActiveHelp=1 + fi + + continue + fi + + if [ -n "$comp" ]; then + # If requested, completions are returned with a description. + # The description is preceded by a TAB character. + # For zsh's _describe, we need to use a : instead of a TAB. + # We first need to escape any : as part of the completion itself. + comp=${comp//:/\\:} + + local tab="$(printf '\t')" + comp=${comp//$tab/:} + + __exercism_debug "Adding completion: ${comp}" + completions+=${comp} + lastComp=$comp + fi + done < <(printf "%s\n" "${out[@]}") + + # Add a delimiter after the activeHelp statements, but only if: + # - there are completions following the activeHelp statements, or + # - file completion will be performed (so there will be choices after the activeHelp) + if [ $hasActiveHelp -eq 1 ]; then + if [ ${#completions} -ne 0 ] || [ $((directive & shellCompDirectiveNoFileComp)) -eq 0 ]; then + __exercism_debug "Adding activeHelp delimiter" + compadd -x "--" + hasActiveHelp=0 + fi + fi + + if [ $((directive & shellCompDirectiveNoSpace)) -ne 0 ]; then + __exercism_debug "Activating nospace." + noSpace="-S ''" + fi + + if [ $((directive & shellCompDirectiveKeepOrder)) -ne 0 ]; then + __exercism_debug "Activating keep order." + keepOrder="-V" + fi + + if [ $((directive & shellCompDirectiveFilterFileExt)) -ne 0 ]; then + # File extension filtering + local filteringCmd + filteringCmd='_files' + for filter in ${completions[@]}; do + if [ ${filter[1]} != '*' ]; then + # zsh requires a glob pattern to do file filtering + filter="\*.$filter" + fi + filteringCmd+=" -g $filter" + done + filteringCmd+=" ${flagPrefix}" + + __exercism_debug "File filtering command: $filteringCmd" + _arguments '*:filename:'"$filteringCmd" + elif [ $((directive & shellCompDirectiveFilterDirs)) -ne 0 ]; then + # File completion for directories only + local subdir + subdir="${completions[1]}" + if [ -n "$subdir" ]; then + __exercism_debug "Listing directories in $subdir" + pushd "${subdir}" >/dev/null 2>&1 + else + __exercism_debug "Listing directories in ." + fi + + local result + _arguments '*:dirname:_files -/'" ${flagPrefix}" + result=$? + if [ -n "$subdir" ]; then + popd >/dev/null 2>&1 + fi + return $result + else + __exercism_debug "Calling _describe" + if eval _describe $keepOrder "completions" completions $flagPrefix $noSpace; then + __exercism_debug "_describe found some completions" + + # Return the success of having called _describe + return 0 + else + __exercism_debug "_describe did not find completions." + __exercism_debug "Checking if we should do file completion." + if [ $((directive & shellCompDirectiveNoFileComp)) -ne 0 ]; then + __exercism_debug "deactivating file completion" + + # We must return an error code here to let zsh know that there were no + # completions found by _describe; this is what will trigger other + # matching algorithms to attempt to find completions. + # For example zsh can match letters in the middle of words. + return 1 + else + # Perform file completion + __exercism_debug "Activating file completion" + + # We must return the result of this command, so it must be the + # last command, or else we must store its result to return it. + _arguments '*:filename:_files'" ${flagPrefix}" + fi + fi + fi +} + +# don't run the completion function when being source-ed or eval-ed +if [ "$funcstack[1]" = "_exercism" ]; then + _exercism +fi diff --git a/dot_config/zsh/completions/_himalaya.zsh b/dot_config/zsh/completions/_himalaya.zsh new file mode 100644 index 0000000000000000000000000000000000000000..35952b54a6737f4c321b91d29366ad070eec6ec1 --- /dev/null +++ b/dot_config/zsh/completions/_himalaya.zsh @@ -0,0 +1,2240 @@ +#compdef himalaya + +autoload -U is-at-least + +_himalaya() { + 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[@]}" \ +'*-c+[Override the default configuration file path]:PATH:_files' \ +'*--config=[Override the default configuration file path]:PATH:_files' \ +'-o+[Customize the output format]:FORMAT:(plain json)' \ +'--output=[Customize the output format]:FORMAT:(plain json)' \ +'-C+[Control when to use colors]:MODE:(never always ansi auto)' \ +'--color=[Control when to use colors]:MODE:(never always ansi auto)' \ +'(--trace)--debug[Enable logs with spantrace]' \ +'(--debug)--trace[Enable verbose logs with backtrace]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +'-V[Print version]' \ +'--version[Print version]' \ +":: :_himalaya_commands" \ +"*::: :->himalaya" \ +&& ret=0 + case $state in + (himalaya) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:himalaya-command-$line[1]:" + case $line[1] in + (account) +_arguments "${_arguments_options[@]}" \ +'*-c+[Override the default configuration file path]:PATH:_files' \ +'*--config=[Override the default configuration file path]:PATH:_files' \ +'-o+[Customize the output format]:FORMAT:(plain json)' \ +'--output=[Customize the output format]:FORMAT:(plain json)' \ +'-C+[Control when to use colors]:MODE:(never always ansi auto)' \ +'--color=[Control when to use colors]:MODE:(never always ansi auto)' \ +'(--trace)--debug[Enable logs with spantrace]' \ +'(--debug)--trace[Enable verbose logs with backtrace]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +'-V[Print version]' \ +'--version[Print version]' \ +":: :_himalaya__account_commands" \ +"*::: :->account" \ +&& ret=0 + + case $state in + (account) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:himalaya-account-command-$line[1]:" + case $line[1] in + (check-up) +_arguments "${_arguments_options[@]}" \ +'*-c+[Override the default configuration file path]:PATH:_files' \ +'*--config=[Override the default configuration file path]:PATH:_files' \ +'-o+[Customize the output format]:FORMAT:(plain json)' \ +'--output=[Customize the output format]:FORMAT:(plain json)' \ +'-C+[Control when to use colors]:MODE:(never always ansi auto)' \ +'--color=[Control when to use colors]:MODE:(never always ansi auto)' \ +'(--trace)--debug[Enable logs with spantrace]' \ +'(--debug)--trace[Enable verbose logs with backtrace]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +'-V[Print version]' \ +'--version[Print version]' \ +'::account_name -- The name of the account:' \ +&& ret=0 +;; +(configure) +_arguments "${_arguments_options[@]}" \ +'*-c+[Override the default configuration file path]:PATH:_files' \ +'*--config=[Override the default configuration file path]:PATH:_files' \ +'-o+[Customize the output format]:FORMAT:(plain json)' \ +'--output=[Customize the output format]:FORMAT:(plain json)' \ +'-C+[Control when to use colors]:MODE:(never always ansi auto)' \ +'--color=[Control when to use colors]:MODE:(never always ansi auto)' \ +'-r[Reset keyring passwords]' \ +'--reset[Reset keyring passwords]' \ +'(--trace)--debug[Enable logs with spantrace]' \ +'(--debug)--trace[Enable verbose logs with backtrace]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +'-V[Print version]' \ +'--version[Print version]' \ +':account_name -- The name of the account:' \ +&& ret=0 +;; +(list) +_arguments "${_arguments_options[@]}" \ +'-w+[The maximum width the table should not exceed]:PIXELS: ' \ +'--max-width=[The maximum width the table should not exceed]:PIXELS: ' \ +'*-c+[Override the default configuration file path]:PATH:_files' \ +'*--config=[Override the default configuration file path]:PATH:_files' \ +'-o+[Customize the output format]:FORMAT:(plain json)' \ +'--output=[Customize the output format]:FORMAT:(plain json)' \ +'-C+[Control when to use colors]:MODE:(never always ansi auto)' \ +'--color=[Control when to use colors]:MODE:(never always ansi auto)' \ +'(--trace)--debug[Enable logs with spantrace]' \ +'(--debug)--trace[Enable verbose logs with backtrace]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +'-V[Print version]' \ +'--version[Print version]' \ +&& ret=0 +;; +(sync) +_arguments "${_arguments_options[@]}" \ +'(-x --exclude-folder -A --all-folders)*-f+[Synchronize only specific folders]:FOLDER: ' \ +'(-x --exclude-folder -A --all-folders)*--include-folder=[Synchronize only specific folders]:FOLDER: ' \ +'(-f --include-folder -A --all-folders)*-x+[Omit specific folders from the synchronization]:FOLDER: ' \ +'(-f --include-folder -A --all-folders)*--exclude-folder=[Omit specific folders from the synchronization]:FOLDER: ' \ +'*-c+[Override the default configuration file path]:PATH:_files' \ +'*--config=[Override the default configuration file path]:PATH:_files' \ +'-o+[Customize the output format]:FORMAT:(plain json)' \ +'--output=[Customize the output format]:FORMAT:(plain json)' \ +'-C+[Control when to use colors]:MODE:(never always ansi auto)' \ +'--color=[Control when to use colors]:MODE:(never always ansi auto)' \ +'-d[Run the synchronization without applying any changes]' \ +'--dry-run[Run the synchronization without applying any changes]' \ +'(-f --include-folder -x --exclude-folder)-A[Synchronize all exsting folders]' \ +'(-f --include-folder -x --exclude-folder)--all-folders[Synchronize all exsting folders]' \ +'(--trace)--debug[Enable logs with spantrace]' \ +'(--debug)--trace[Enable verbose logs with backtrace]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +'-V[Print version]' \ +'--version[Print version]' \ +'::account_name -- The name of the account:' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" \ +":: :_himalaya__account__help_commands" \ +"*::: :->help" \ +&& ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:himalaya-account-help-command-$line[1]:" + case $line[1] in + (check-up) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(configure) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(list) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(sync) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +;; +(folder) +_arguments "${_arguments_options[@]}" \ +'*-c+[Override the default configuration file path]:PATH:_files' \ +'*--config=[Override the default configuration file path]:PATH:_files' \ +'-o+[Customize the output format]:FORMAT:(plain json)' \ +'--output=[Customize the output format]:FORMAT:(plain json)' \ +'-C+[Control when to use colors]:MODE:(never always ansi auto)' \ +'--color=[Control when to use colors]:MODE:(never always ansi auto)' \ +'(--trace)--debug[Enable logs with spantrace]' \ +'(--debug)--trace[Enable verbose logs with backtrace]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +'-V[Print version]' \ +'--version[Print version]' \ +":: :_himalaya__folder_commands" \ +"*::: :->folder" \ +&& ret=0 + + case $state in + (folder) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:himalaya-folder-command-$line[1]:" + case $line[1] in + (add) +_arguments "${_arguments_options[@]}" \ +'-a+[Override the default account]:NAME: ' \ +'--account=[Override the default account]:NAME: ' \ +'*-c+[Override the default configuration file path]:PATH:_files' \ +'*--config=[Override the default configuration file path]:PATH:_files' \ +'-o+[Customize the output format]:FORMAT:(plain json)' \ +'--output=[Customize the output format]:FORMAT:(plain json)' \ +'-C+[Control when to use colors]:MODE:(never always ansi auto)' \ +'--color=[Control when to use colors]:MODE:(never always ansi auto)' \ +'--disable-cache[Disable any sort of cache]' \ +'(--trace)--debug[Enable logs with spantrace]' \ +'(--debug)--trace[Enable verbose logs with backtrace]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +'-V[Print version]' \ +'--version[Print version]' \ +':folder_name -- The name of the folder:' \ +&& ret=0 +;; +(list) +_arguments "${_arguments_options[@]}" \ +'-w+[The maximum width the table should not exceed]:PIXELS: ' \ +'--max-width=[The maximum width the table should not exceed]:PIXELS: ' \ +'-a+[Override the default account]:NAME: ' \ +'--account=[Override the default account]:NAME: ' \ +'*-c+[Override the default configuration file path]:PATH:_files' \ +'*--config=[Override the default configuration file path]:PATH:_files' \ +'-o+[Customize the output format]:FORMAT:(plain json)' \ +'--output=[Customize the output format]:FORMAT:(plain json)' \ +'-C+[Control when to use colors]:MODE:(never always ansi auto)' \ +'--color=[Control when to use colors]:MODE:(never always ansi auto)' \ +'--disable-cache[Disable any sort of cache]' \ +'(--trace)--debug[Enable logs with spantrace]' \ +'(--debug)--trace[Enable verbose logs with backtrace]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +'-V[Print version]' \ +'--version[Print version]' \ +&& ret=0 +;; +(expunge) +_arguments "${_arguments_options[@]}" \ +'-a+[Override the default account]:NAME: ' \ +'--account=[Override the default account]:NAME: ' \ +'*-c+[Override the default configuration file path]:PATH:_files' \ +'*--config=[Override the default configuration file path]:PATH:_files' \ +'-o+[Customize the output format]:FORMAT:(plain json)' \ +'--output=[Customize the output format]:FORMAT:(plain json)' \ +'-C+[Control when to use colors]:MODE:(never always ansi auto)' \ +'--color=[Control when to use colors]:MODE:(never always ansi auto)' \ +'--disable-cache[Disable any sort of cache]' \ +'(--trace)--debug[Enable logs with spantrace]' \ +'(--debug)--trace[Enable verbose logs with backtrace]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +'-V[Print version]' \ +'--version[Print version]' \ +':folder_name -- The name of the folder:' \ +&& ret=0 +;; +(purge) +_arguments "${_arguments_options[@]}" \ +'-a+[Override the default account]:NAME: ' \ +'--account=[Override the default account]:NAME: ' \ +'*-c+[Override the default configuration file path]:PATH:_files' \ +'*--config=[Override the default configuration file path]:PATH:_files' \ +'-o+[Customize the output format]:FORMAT:(plain json)' \ +'--output=[Customize the output format]:FORMAT:(plain json)' \ +'-C+[Control when to use colors]:MODE:(never always ansi auto)' \ +'--color=[Control when to use colors]:MODE:(never always ansi auto)' \ +'--disable-cache[Disable any sort of cache]' \ +'(--trace)--debug[Enable logs with spantrace]' \ +'(--debug)--trace[Enable verbose logs with backtrace]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +'-V[Print version]' \ +'--version[Print version]' \ +':folder_name -- The name of the folder:' \ +&& ret=0 +;; +(delete) +_arguments "${_arguments_options[@]}" \ +'-a+[Override the default account]:NAME: ' \ +'--account=[Override the default account]:NAME: ' \ +'*-c+[Override the default configuration file path]:PATH:_files' \ +'*--config=[Override the default configuration file path]:PATH:_files' \ +'-o+[Customize the output format]:FORMAT:(plain json)' \ +'--output=[Customize the output format]:FORMAT:(plain json)' \ +'-C+[Control when to use colors]:MODE:(never always ansi auto)' \ +'--color=[Control when to use colors]:MODE:(never always ansi auto)' \ +'--disable-cache[Disable any sort of cache]' \ +'(--trace)--debug[Enable logs with spantrace]' \ +'(--debug)--trace[Enable verbose logs with backtrace]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +'-V[Print version]' \ +'--version[Print version]' \ +':folder_name -- The name of the folder:' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" \ +":: :_himalaya__folder__help_commands" \ +"*::: :->help" \ +&& ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:himalaya-folder-help-command-$line[1]:" + case $line[1] in + (add) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(list) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(expunge) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(purge) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(delete) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +;; +(envelope) +_arguments "${_arguments_options[@]}" \ +'*-c+[Override the default configuration file path]:PATH:_files' \ +'*--config=[Override the default configuration file path]:PATH:_files' \ +'-o+[Customize the output format]:FORMAT:(plain json)' \ +'--output=[Customize the output format]:FORMAT:(plain json)' \ +'-C+[Control when to use colors]:MODE:(never always ansi auto)' \ +'--color=[Control when to use colors]:MODE:(never always ansi auto)' \ +'(--trace)--debug[Enable logs with spantrace]' \ +'(--debug)--trace[Enable verbose logs with backtrace]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +'-V[Print version]' \ +'--version[Print version]' \ +":: :_himalaya__envelope_commands" \ +"*::: :->envelope" \ +&& ret=0 + + case $state in + (envelope) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:himalaya-envelope-command-$line[1]:" + case $line[1] in + (list) +_arguments "${_arguments_options[@]}" \ +'-f+[The name of the folder]:NAME: ' \ +'--folder=[The name of the folder]:NAME: ' \ +'-p+[The page number]:NUMBER: ' \ +'--page=[The page number]:NUMBER: ' \ +'-s+[The page size]:NUMBER: ' \ +'--page-size=[The page size]:NUMBER: ' \ +'-w+[The maximum width the table should not exceed]:PIXELS: ' \ +'--max-width=[The maximum width the table should not exceed]:PIXELS: ' \ +'-a+[Override the default account]:NAME: ' \ +'--account=[Override the default account]:NAME: ' \ +'*-c+[Override the default configuration file path]:PATH:_files' \ +'*--config=[Override the default configuration file path]:PATH:_files' \ +'-o+[Customize the output format]:FORMAT:(plain json)' \ +'--output=[Customize the output format]:FORMAT:(plain json)' \ +'-C+[Control when to use colors]:MODE:(never always ansi auto)' \ +'--color=[Control when to use colors]:MODE:(never always ansi auto)' \ +'--disable-cache[Disable any sort of cache]' \ +'(--trace)--debug[Enable logs with spantrace]' \ +'(--debug)--trace[Enable verbose logs with backtrace]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +'-V[Print version]' \ +'--version[Print version]' \ +'*::query -- The list envelopes filter and sort query:' \ +&& ret=0 +;; +(watch) +_arguments "${_arguments_options[@]}" \ +'-f+[The name of the folder]:NAME: ' \ +'--folder=[The name of the folder]:NAME: ' \ +'-a+[Override the default account]:NAME: ' \ +'--account=[Override the default account]:NAME: ' \ +'*-c+[Override the default configuration file path]:PATH:_files' \ +'*--config=[Override the default configuration file path]:PATH:_files' \ +'-o+[Customize the output format]:FORMAT:(plain json)' \ +'--output=[Customize the output format]:FORMAT:(plain json)' \ +'-C+[Control when to use colors]:MODE:(never always ansi auto)' \ +'--color=[Control when to use colors]:MODE:(never always ansi auto)' \ +'--disable-cache[Disable any sort of cache]' \ +'(--trace)--debug[Enable logs with spantrace]' \ +'(--debug)--trace[Enable verbose logs with backtrace]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +'-V[Print version]' \ +'--version[Print version]' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" \ +":: :_himalaya__envelope__help_commands" \ +"*::: :->help" \ +&& ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:himalaya-envelope-help-command-$line[1]:" + case $line[1] in + (list) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(watch) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +;; +(flag) +_arguments "${_arguments_options[@]}" \ +'*-c+[Override the default configuration file path]:PATH:_files' \ +'*--config=[Override the default configuration file path]:PATH:_files' \ +'-o+[Customize the output format]:FORMAT:(plain json)' \ +'--output=[Customize the output format]:FORMAT:(plain json)' \ +'-C+[Control when to use colors]:MODE:(never always ansi auto)' \ +'--color=[Control when to use colors]:MODE:(never always ansi auto)' \ +'(--trace)--debug[Enable logs with spantrace]' \ +'(--debug)--trace[Enable verbose logs with backtrace]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +'-V[Print version]' \ +'--version[Print version]' \ +":: :_himalaya__flag_commands" \ +"*::: :->flag" \ +&& ret=0 + + case $state in + (flag) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:himalaya-flag-command-$line[1]:" + case $line[1] in + (add) +_arguments "${_arguments_options[@]}" \ +'-f+[The name of the folder]:NAME: ' \ +'--folder=[The name of the folder]:NAME: ' \ +'-a+[Override the default account]:NAME: ' \ +'--account=[Override the default account]:NAME: ' \ +'*-c+[Override the default configuration file path]:PATH:_files' \ +'*--config=[Override the default configuration file path]:PATH:_files' \ +'-o+[Customize the output format]:FORMAT:(plain json)' \ +'--output=[Customize the output format]:FORMAT:(plain json)' \ +'-C+[Control when to use colors]:MODE:(never always ansi auto)' \ +'--color=[Control when to use colors]:MODE:(never always ansi auto)' \ +'--disable-cache[Disable any sort of cache]' \ +'(--trace)--debug[Enable logs with spantrace]' \ +'(--debug)--trace[Enable verbose logs with backtrace]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +'-V[Print version]' \ +'--version[Print version]' \ +'*::ids_and_flags -- The list of ids and/or flags:' \ +&& ret=0 +;; +(set) +_arguments "${_arguments_options[@]}" \ +'-f+[The name of the folder]:NAME: ' \ +'--folder=[The name of the folder]:NAME: ' \ +'-a+[Override the default account]:NAME: ' \ +'--account=[Override the default account]:NAME: ' \ +'*-c+[Override the default configuration file path]:PATH:_files' \ +'*--config=[Override the default configuration file path]:PATH:_files' \ +'-o+[Customize the output format]:FORMAT:(plain json)' \ +'--output=[Customize the output format]:FORMAT:(plain json)' \ +'-C+[Control when to use colors]:MODE:(never always ansi auto)' \ +'--color=[Control when to use colors]:MODE:(never always ansi auto)' \ +'--disable-cache[Disable any sort of cache]' \ +'(--trace)--debug[Enable logs with spantrace]' \ +'(--debug)--trace[Enable verbose logs with backtrace]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +'-V[Print version]' \ +'--version[Print version]' \ +'*::ids_and_flags -- The list of ids and/or flags:' \ +&& ret=0 +;; +(remove) +_arguments "${_arguments_options[@]}" \ +'-f+[The name of the folder]:NAME: ' \ +'--folder=[The name of the folder]:NAME: ' \ +'-a+[Override the default account]:NAME: ' \ +'--account=[Override the default account]:NAME: ' \ +'*-c+[Override the default configuration file path]:PATH:_files' \ +'*--config=[Override the default configuration file path]:PATH:_files' \ +'-o+[Customize the output format]:FORMAT:(plain json)' \ +'--output=[Customize the output format]:FORMAT:(plain json)' \ +'-C+[Control when to use colors]:MODE:(never always ansi auto)' \ +'--color=[Control when to use colors]:MODE:(never always ansi auto)' \ +'--disable-cache[Disable any sort of cache]' \ +'(--trace)--debug[Enable logs with spantrace]' \ +'(--debug)--trace[Enable verbose logs with backtrace]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +'-V[Print version]' \ +'--version[Print version]' \ +'*::ids_and_flags -- The list of ids and/or flags:' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" \ +":: :_himalaya__flag__help_commands" \ +"*::: :->help" \ +&& ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:himalaya-flag-help-command-$line[1]:" + case $line[1] in + (add) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(set) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(remove) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +;; +(message) +_arguments "${_arguments_options[@]}" \ +'*-c+[Override the default configuration file path]:PATH:_files' \ +'*--config=[Override the default configuration file path]:PATH:_files' \ +'-o+[Customize the output format]:FORMAT:(plain json)' \ +'--output=[Customize the output format]:FORMAT:(plain json)' \ +'-C+[Control when to use colors]:MODE:(never always ansi auto)' \ +'--color=[Control when to use colors]:MODE:(never always ansi auto)' \ +'(--trace)--debug[Enable logs with spantrace]' \ +'(--debug)--trace[Enable verbose logs with backtrace]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +'-V[Print version]' \ +'--version[Print version]' \ +":: :_himalaya__message_commands" \ +"*::: :->message" \ +&& ret=0 + + case $state in + (message) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:himalaya-message-command-$line[1]:" + case $line[1] in + (read) +_arguments "${_arguments_options[@]}" \ +'-f+[The name of the folder]:NAME: ' \ +'--folder=[The name of the folder]:NAME: ' \ +'(-r --raw --no-headers)*-H+[List of headers that should be visible at the top of the message]:NAME: ' \ +'(-r --raw --no-headers)*--header=[List of headers that should be visible at the top of the message]:NAME: ' \ +'-a+[Override the default account]:NAME: ' \ +'--account=[Override the default account]:NAME: ' \ +'*-c+[Override the default configuration file path]:PATH:_files' \ +'*--config=[Override the default configuration file path]:PATH:_files' \ +'-o+[Customize the output format]:FORMAT:(plain json)' \ +'--output=[Customize the output format]:FORMAT:(plain json)' \ +'-C+[Control when to use colors]:MODE:(never always ansi auto)' \ +'--color=[Control when to use colors]:MODE:(never always ansi auto)' \ +'-p[Read the message without applying the "seen" flag to its corresponding envelope]' \ +'--preview[Read the message without applying the "seen" flag to its corresponding envelope]' \ +'(--no-headers -H --header)-r[Read the raw version of the given message]' \ +'(--no-headers -H --header)--raw[Read the raw version of the given message]' \ +'(-r --raw)--html[Read only body of text/html parts]' \ +'(-r --raw -H --header)--no-headers[Read only the body of the message]' \ +'--disable-cache[Disable any sort of cache]' \ +'(--trace)--debug[Enable logs with spantrace]' \ +'(--debug)--trace[Enable verbose logs with backtrace]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +'-V[Print version]' \ +'--version[Print version]' \ +'*::ids -- The list of envelopes ids:' \ +&& ret=0 +;; +(write) +_arguments "${_arguments_options[@]}" \ +'*-H+[Prefill the template with custom headers]:KEY:VAL: ' \ +'*--header=[Prefill the template with custom headers]:KEY:VAL: ' \ +'-a+[Override the default account]:NAME: ' \ +'--account=[Override the default account]:NAME: ' \ +'*-c+[Override the default configuration file path]:PATH:_files' \ +'*--config=[Override the default configuration file path]:PATH:_files' \ +'-o+[Customize the output format]:FORMAT:(plain json)' \ +'--output=[Customize the output format]:FORMAT:(plain json)' \ +'-C+[Control when to use colors]:MODE:(never always ansi auto)' \ +'--color=[Control when to use colors]:MODE:(never always ansi auto)' \ +'--disable-cache[Disable any sort of cache]' \ +'(--trace)--debug[Enable logs with spantrace]' \ +'(--debug)--trace[Enable verbose logs with backtrace]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +'-V[Print version]' \ +'--version[Print version]' \ +'*::body_raw -- Prefill the template with a custom body:' \ +&& ret=0 +;; +(reply) +_arguments "${_arguments_options[@]}" \ +'-f+[The name of the folder]:NAME: ' \ +'--folder=[The name of the folder]:NAME: ' \ +'*-H+[Prefill the template with custom headers]:KEY:VAL: ' \ +'*--header=[Prefill the template with custom headers]:KEY:VAL: ' \ +'-a+[Override the default account]:NAME: ' \ +'--account=[Override the default account]:NAME: ' \ +'*-c+[Override the default configuration file path]:PATH:_files' \ +'*--config=[Override the default configuration file path]:PATH:_files' \ +'-o+[Customize the output format]:FORMAT:(plain json)' \ +'--output=[Customize the output format]:FORMAT:(plain json)' \ +'-C+[Control when to use colors]:MODE:(never always ansi auto)' \ +'--color=[Control when to use colors]:MODE:(never always ansi auto)' \ +'-A[Reply to all recipients]' \ +'--all[Reply to all recipients]' \ +'--disable-cache[Disable any sort of cache]' \ +'(--trace)--debug[Enable logs with spantrace]' \ +'(--debug)--trace[Enable verbose logs with backtrace]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +'-V[Print version]' \ +'--version[Print version]' \ +':id -- The envelope id:' \ +'*::body_raw -- Prefill the template with a custom body:' \ +&& ret=0 +;; +(forward) +_arguments "${_arguments_options[@]}" \ +'-f+[The name of the folder]:NAME: ' \ +'--folder=[The name of the folder]:NAME: ' \ +'*-H+[Prefill the template with custom headers]:KEY:VAL: ' \ +'*--header=[Prefill the template with custom headers]:KEY:VAL: ' \ +'-a+[Override the default account]:NAME: ' \ +'--account=[Override the default account]:NAME: ' \ +'*-c+[Override the default configuration file path]:PATH:_files' \ +'*--config=[Override the default configuration file path]:PATH:_files' \ +'-o+[Customize the output format]:FORMAT:(plain json)' \ +'--output=[Customize the output format]:FORMAT:(plain json)' \ +'-C+[Control when to use colors]:MODE:(never always ansi auto)' \ +'--color=[Control when to use colors]:MODE:(never always ansi auto)' \ +'--disable-cache[Disable any sort of cache]' \ +'(--trace)--debug[Enable logs with spantrace]' \ +'(--debug)--trace[Enable verbose logs with backtrace]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +'-V[Print version]' \ +'--version[Print version]' \ +':id -- The envelope id:' \ +'*::body_raw -- Prefill the template with a custom body:' \ +&& ret=0 +;; +(mailto) +_arguments "${_arguments_options[@]}" \ +'-a+[Override the default account]:NAME: ' \ +'--account=[Override the default account]:NAME: ' \ +'*-c+[Override the default configuration file path]:PATH:_files' \ +'*--config=[Override the default configuration file path]:PATH:_files' \ +'-o+[Customize the output format]:FORMAT:(plain json)' \ +'--output=[Customize the output format]:FORMAT:(plain json)' \ +'-C+[Control when to use colors]:MODE:(never always ansi auto)' \ +'--color=[Control when to use colors]:MODE:(never always ansi auto)' \ +'--disable-cache[Disable any sort of cache]' \ +'(--trace)--debug[Enable logs with spantrace]' \ +'(--debug)--trace[Enable verbose logs with backtrace]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +'-V[Print version]' \ +'--version[Print version]' \ +':url -- The mailto url:' \ +&& ret=0 +;; +(save) +_arguments "${_arguments_options[@]}" \ +'-f+[The name of the folder]:NAME: ' \ +'--folder=[The name of the folder]:NAME: ' \ +'-a+[Override the default account]:NAME: ' \ +'--account=[Override the default account]:NAME: ' \ +'*-c+[Override the default configuration file path]:PATH:_files' \ +'*--config=[Override the default configuration file path]:PATH:_files' \ +'-o+[Customize the output format]:FORMAT:(plain json)' \ +'--output=[Customize the output format]:FORMAT:(plain json)' \ +'-C+[Control when to use colors]:MODE:(never always ansi auto)' \ +'--color=[Control when to use colors]:MODE:(never always ansi auto)' \ +'--disable-cache[Disable any sort of cache]' \ +'(--trace)--debug[Enable logs with spantrace]' \ +'(--debug)--trace[Enable verbose logs with backtrace]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +'-V[Print version]' \ +'--version[Print version]' \ +'*::message_raw -- The raw message, including headers and body:' \ +&& ret=0 +;; +(send) +_arguments "${_arguments_options[@]}" \ +'-a+[Override the default account]:NAME: ' \ +'--account=[Override the default account]:NAME: ' \ +'*-c+[Override the default configuration file path]:PATH:_files' \ +'*--config=[Override the default configuration file path]:PATH:_files' \ +'-o+[Customize the output format]:FORMAT:(plain json)' \ +'--output=[Customize the output format]:FORMAT:(plain json)' \ +'-C+[Control when to use colors]:MODE:(never always ansi auto)' \ +'--color=[Control when to use colors]:MODE:(never always ansi auto)' \ +'--disable-cache[Disable any sort of cache]' \ +'(--trace)--debug[Enable logs with spantrace]' \ +'(--debug)--trace[Enable verbose logs with backtrace]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +'-V[Print version]' \ +'--version[Print version]' \ +'*::message_raw -- The raw message, including headers and body:' \ +&& ret=0 +;; +(copy) +_arguments "${_arguments_options[@]}" \ +'-f+[The name of the source folder]:SOURCE: ' \ +'--folder=[The name of the source folder]:SOURCE: ' \ +'-a+[Override the default account]:NAME: ' \ +'--account=[Override the default account]:NAME: ' \ +'*-c+[Override the default configuration file path]:PATH:_files' \ +'*--config=[Override the default configuration file path]:PATH:_files' \ +'-o+[Customize the output format]:FORMAT:(plain json)' \ +'--output=[Customize the output format]:FORMAT:(plain json)' \ +'-C+[Control when to use colors]:MODE:(never always ansi auto)' \ +'--color=[Control when to use colors]:MODE:(never always ansi auto)' \ +'--disable-cache[Disable any sort of cache]' \ +'(--trace)--debug[Enable logs with spantrace]' \ +'(--debug)--trace[Enable verbose logs with backtrace]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +'-V[Print version]' \ +'--version[Print version]' \ +':target_folder_name -- The name of the target folder:' \ +'*::ids -- The list of envelopes ids:' \ +&& ret=0 +;; +(move) +_arguments "${_arguments_options[@]}" \ +'-f+[The name of the source folder]:SOURCE: ' \ +'--folder=[The name of the source folder]:SOURCE: ' \ +'-a+[Override the default account]:NAME: ' \ +'--account=[Override the default account]:NAME: ' \ +'*-c+[Override the default configuration file path]:PATH:_files' \ +'*--config=[Override the default configuration file path]:PATH:_files' \ +'-o+[Customize the output format]:FORMAT:(plain json)' \ +'--output=[Customize the output format]:FORMAT:(plain json)' \ +'-C+[Control when to use colors]:MODE:(never always ansi auto)' \ +'--color=[Control when to use colors]:MODE:(never always ansi auto)' \ +'--disable-cache[Disable any sort of cache]' \ +'(--trace)--debug[Enable logs with spantrace]' \ +'(--debug)--trace[Enable verbose logs with backtrace]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +'-V[Print version]' \ +'--version[Print version]' \ +':target_folder_name -- The name of the target folder:' \ +'*::ids -- The list of envelopes ids:' \ +&& ret=0 +;; +(delete) +_arguments "${_arguments_options[@]}" \ +'-f+[The name of the folder]:NAME: ' \ +'--folder=[The name of the folder]:NAME: ' \ +'-a+[Override the default account]:NAME: ' \ +'--account=[Override the default account]:NAME: ' \ +'*-c+[Override the default configuration file path]:PATH:_files' \ +'*--config=[Override the default configuration file path]:PATH:_files' \ +'-o+[Customize the output format]:FORMAT:(plain json)' \ +'--output=[Customize the output format]:FORMAT:(plain json)' \ +'-C+[Control when to use colors]:MODE:(never always ansi auto)' \ +'--color=[Control when to use colors]:MODE:(never always ansi auto)' \ +'--disable-cache[Disable any sort of cache]' \ +'(--trace)--debug[Enable logs with spantrace]' \ +'(--debug)--trace[Enable verbose logs with backtrace]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +'-V[Print version]' \ +'--version[Print version]' \ +'*::ids -- The list of envelopes ids:' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" \ +":: :_himalaya__message__help_commands" \ +"*::: :->help" \ +&& ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:himalaya-message-help-command-$line[1]:" + case $line[1] in + (read) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(write) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(reply) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(forward) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(mailto) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(save) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(send) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(copy) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(move) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(delete) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +;; +(attachment) +_arguments "${_arguments_options[@]}" \ +'*-c+[Override the default configuration file path]:PATH:_files' \ +'*--config=[Override the default configuration file path]:PATH:_files' \ +'-o+[Customize the output format]:FORMAT:(plain json)' \ +'--output=[Customize the output format]:FORMAT:(plain json)' \ +'-C+[Control when to use colors]:MODE:(never always ansi auto)' \ +'--color=[Control when to use colors]:MODE:(never always ansi auto)' \ +'(--trace)--debug[Enable logs with spantrace]' \ +'(--debug)--trace[Enable verbose logs with backtrace]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +'-V[Print version]' \ +'--version[Print version]' \ +":: :_himalaya__attachment_commands" \ +"*::: :->attachment" \ +&& ret=0 + + case $state in + (attachment) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:himalaya-attachment-command-$line[1]:" + case $line[1] in + (download) +_arguments "${_arguments_options[@]}" \ +'-f+[The name of the folder]:NAME: ' \ +'--folder=[The name of the folder]:NAME: ' \ +'-a+[Override the default account]:NAME: ' \ +'--account=[Override the default account]:NAME: ' \ +'*-c+[Override the default configuration file path]:PATH:_files' \ +'*--config=[Override the default configuration file path]:PATH:_files' \ +'-o+[Customize the output format]:FORMAT:(plain json)' \ +'--output=[Customize the output format]:FORMAT:(plain json)' \ +'-C+[Control when to use colors]:MODE:(never always ansi auto)' \ +'--color=[Control when to use colors]:MODE:(never always ansi auto)' \ +'--disable-cache[Disable any sort of cache]' \ +'(--trace)--debug[Enable logs with spantrace]' \ +'(--debug)--trace[Enable verbose logs with backtrace]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +'-V[Print version]' \ +'--version[Print version]' \ +'*::ids -- The list of envelopes ids:' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" \ +":: :_himalaya__attachment__help_commands" \ +"*::: :->help" \ +&& ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:himalaya-attachment-help-command-$line[1]:" + case $line[1] in + (download) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +;; +(template) +_arguments "${_arguments_options[@]}" \ +'*-c+[Override the default configuration file path]:PATH:_files' \ +'*--config=[Override the default configuration file path]:PATH:_files' \ +'-o+[Customize the output format]:FORMAT:(plain json)' \ +'--output=[Customize the output format]:FORMAT:(plain json)' \ +'-C+[Control when to use colors]:MODE:(never always ansi auto)' \ +'--color=[Control when to use colors]:MODE:(never always ansi auto)' \ +'(--trace)--debug[Enable logs with spantrace]' \ +'(--debug)--trace[Enable verbose logs with backtrace]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +'-V[Print version]' \ +'--version[Print version]' \ +":: :_himalaya__template_commands" \ +"*::: :->template" \ +&& ret=0 + + case $state in + (template) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:himalaya-template-command-$line[1]:" + case $line[1] in + (write) +_arguments "${_arguments_options[@]}" \ +'*-H+[Prefill the template with custom headers]:KEY:VAL: ' \ +'*--header=[Prefill the template with custom headers]:KEY:VAL: ' \ +'-a+[Override the default account]:NAME: ' \ +'--account=[Override the default account]:NAME: ' \ +'*-c+[Override the default configuration file path]:PATH:_files' \ +'*--config=[Override the default configuration file path]:PATH:_files' \ +'-o+[Customize the output format]:FORMAT:(plain json)' \ +'--output=[Customize the output format]:FORMAT:(plain json)' \ +'-C+[Control when to use colors]:MODE:(never always ansi auto)' \ +'--color=[Control when to use colors]:MODE:(never always ansi auto)' \ +'--disable-cache[Disable any sort of cache]' \ +'(--trace)--debug[Enable logs with spantrace]' \ +'(--debug)--trace[Enable verbose logs with backtrace]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +'-V[Print version]' \ +'--version[Print version]' \ +'*::body_raw -- Prefill the template with a custom MML body:' \ +&& ret=0 +;; +(reply) +_arguments "${_arguments_options[@]}" \ +'-f+[The name of the folder]:NAME: ' \ +'--folder=[The name of the folder]:NAME: ' \ +'*-H+[Prefill the template with custom headers]:KEY:VAL: ' \ +'*--header=[Prefill the template with custom headers]:KEY:VAL: ' \ +'-a+[Override the default account]:NAME: ' \ +'--account=[Override the default account]:NAME: ' \ +'*-c+[Override the default configuration file path]:PATH:_files' \ +'*--config=[Override the default configuration file path]:PATH:_files' \ +'-o+[Customize the output format]:FORMAT:(plain json)' \ +'--output=[Customize the output format]:FORMAT:(plain json)' \ +'-C+[Control when to use colors]:MODE:(never always ansi auto)' \ +'--color=[Control when to use colors]:MODE:(never always ansi auto)' \ +'-A[Reply to all recipients]' \ +'--all[Reply to all recipients]' \ +'--disable-cache[Disable any sort of cache]' \ +'(--trace)--debug[Enable logs with spantrace]' \ +'(--debug)--trace[Enable verbose logs with backtrace]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +'-V[Print version]' \ +'--version[Print version]' \ +':id -- The envelope id:' \ +'*::body_raw -- Prefill the template with a custom body:' \ +&& ret=0 +;; +(forward) +_arguments "${_arguments_options[@]}" \ +'-f+[The name of the folder]:NAME: ' \ +'--folder=[The name of the folder]:NAME: ' \ +'*-H+[Prefill the template with custom headers]:KEY:VAL: ' \ +'*--header=[Prefill the template with custom headers]:KEY:VAL: ' \ +'-a+[Override the default account]:NAME: ' \ +'--account=[Override the default account]:NAME: ' \ +'*-c+[Override the default configuration file path]:PATH:_files' \ +'*--config=[Override the default configuration file path]:PATH:_files' \ +'-o+[Customize the output format]:FORMAT:(plain json)' \ +'--output=[Customize the output format]:FORMAT:(plain json)' \ +'-C+[Control when to use colors]:MODE:(never always ansi auto)' \ +'--color=[Control when to use colors]:MODE:(never always ansi auto)' \ +'--disable-cache[Disable any sort of cache]' \ +'(--trace)--debug[Enable logs with spantrace]' \ +'(--debug)--trace[Enable verbose logs with backtrace]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +'-V[Print version]' \ +'--version[Print version]' \ +':id -- The envelope id:' \ +'*::body_raw -- Prefill the template with a custom body:' \ +&& ret=0 +;; +(save) +_arguments "${_arguments_options[@]}" \ +'-f+[The name of the folder]:NAME: ' \ +'--folder=[The name of the folder]:NAME: ' \ +'-a+[Override the default account]:NAME: ' \ +'--account=[Override the default account]:NAME: ' \ +'*-c+[Override the default configuration file path]:PATH:_files' \ +'*--config=[Override the default configuration file path]:PATH:_files' \ +'-o+[Customize the output format]:FORMAT:(plain json)' \ +'--output=[Customize the output format]:FORMAT:(plain json)' \ +'-C+[Control when to use colors]:MODE:(never always ansi auto)' \ +'--color=[Control when to use colors]:MODE:(never always ansi auto)' \ +'--disable-cache[Disable any sort of cache]' \ +'(--trace)--debug[Enable logs with spantrace]' \ +'(--debug)--trace[Enable verbose logs with backtrace]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +'-V[Print version]' \ +'--version[Print version]' \ +'*::template_raw -- The raw template, including headers and MML body:' \ +&& ret=0 +;; +(send) +_arguments "${_arguments_options[@]}" \ +'-a+[Override the default account]:NAME: ' \ +'--account=[Override the default account]:NAME: ' \ +'*-c+[Override the default configuration file path]:PATH:_files' \ +'*--config=[Override the default configuration file path]:PATH:_files' \ +'-o+[Customize the output format]:FORMAT:(plain json)' \ +'--output=[Customize the output format]:FORMAT:(plain json)' \ +'-C+[Control when to use colors]:MODE:(never always ansi auto)' \ +'--color=[Control when to use colors]:MODE:(never always ansi auto)' \ +'--disable-cache[Disable any sort of cache]' \ +'(--trace)--debug[Enable logs with spantrace]' \ +'(--debug)--trace[Enable verbose logs with backtrace]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +'-V[Print version]' \ +'--version[Print version]' \ +'*::template_raw -- The raw template, including headers and MML body:' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" \ +":: :_himalaya__template__help_commands" \ +"*::: :->help" \ +&& ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:himalaya-template-help-command-$line[1]:" + case $line[1] in + (write) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(reply) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(forward) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(save) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(send) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +;; +(manual) +_arguments "${_arguments_options[@]}" \ +'*-c+[Override the default configuration file path]:PATH:_files' \ +'*--config=[Override the default configuration file path]:PATH:_files' \ +'-o+[Customize the output format]:FORMAT:(plain json)' \ +'--output=[Customize the output format]:FORMAT:(plain json)' \ +'-C+[Control when to use colors]:MODE:(never always ansi auto)' \ +'--color=[Control when to use colors]:MODE:(never always ansi auto)' \ +'(--trace)--debug[Enable logs with spantrace]' \ +'(--debug)--trace[Enable verbose logs with backtrace]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +'-V[Print version]' \ +'--version[Print version]' \ +':dir -- Directory where man files should be generated in:_files' \ +&& ret=0 +;; +(completion) +_arguments "${_arguments_options[@]}" \ +'*-c+[Override the default configuration file path]:PATH:_files' \ +'*--config=[Override the default configuration file path]:PATH:_files' \ +'-o+[Customize the output format]:FORMAT:(plain json)' \ +'--output=[Customize the output format]:FORMAT:(plain json)' \ +'-C+[Control when to use colors]:MODE:(never always ansi auto)' \ +'--color=[Control when to use colors]:MODE:(never always ansi auto)' \ +'(--trace)--debug[Enable logs with spantrace]' \ +'(--debug)--trace[Enable verbose logs with backtrace]' \ +'-h[Print help (see more with '\''--help'\'')]' \ +'--help[Print help (see more with '\''--help'\'')]' \ +'-V[Print version]' \ +'--version[Print version]' \ +':shell -- Shell for which completion script should be generated for:(bash elvish fish powershell zsh)' \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" \ +":: :_himalaya__help_commands" \ +"*::: :->help" \ +&& ret=0 + + case $state in + (help) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:himalaya-help-command-$line[1]:" + case $line[1] in + (account) +_arguments "${_arguments_options[@]}" \ +":: :_himalaya__help__account_commands" \ +"*::: :->account" \ +&& ret=0 + + case $state in + (account) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:himalaya-help-account-command-$line[1]:" + case $line[1] in + (check-up) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(configure) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(list) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(sync) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; + esac + ;; +esac +;; +(folder) +_arguments "${_arguments_options[@]}" \ +":: :_himalaya__help__folder_commands" \ +"*::: :->folder" \ +&& ret=0 + + case $state in + (folder) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:himalaya-help-folder-command-$line[1]:" + case $line[1] in + (add) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(list) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(expunge) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(purge) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(delete) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; + esac + ;; +esac +;; +(envelope) +_arguments "${_arguments_options[@]}" \ +":: :_himalaya__help__envelope_commands" \ +"*::: :->envelope" \ +&& ret=0 + + case $state in + (envelope) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:himalaya-help-envelope-command-$line[1]:" + case $line[1] in + (list) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(watch) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; + esac + ;; +esac +;; +(flag) +_arguments "${_arguments_options[@]}" \ +":: :_himalaya__help__flag_commands" \ +"*::: :->flag" \ +&& ret=0 + + case $state in + (flag) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:himalaya-help-flag-command-$line[1]:" + case $line[1] in + (add) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(set) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(remove) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; + esac + ;; +esac +;; +(message) +_arguments "${_arguments_options[@]}" \ +":: :_himalaya__help__message_commands" \ +"*::: :->message" \ +&& ret=0 + + case $state in + (message) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:himalaya-help-message-command-$line[1]:" + case $line[1] in + (read) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(write) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(reply) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(forward) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(mailto) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(save) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(send) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(copy) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(move) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(delete) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; + esac + ;; +esac +;; +(attachment) +_arguments "${_arguments_options[@]}" \ +":: :_himalaya__help__attachment_commands" \ +"*::: :->attachment" \ +&& ret=0 + + case $state in + (attachment) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:himalaya-help-attachment-command-$line[1]:" + case $line[1] in + (download) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; + esac + ;; +esac +;; +(template) +_arguments "${_arguments_options[@]}" \ +":: :_himalaya__help__template_commands" \ +"*::: :->template" \ +&& ret=0 + + case $state in + (template) + words=($line[1] "${words[@]}") + (( CURRENT += 1 )) + curcontext="${curcontext%:*:*}:himalaya-help-template-command-$line[1]:" + case $line[1] in + (write) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(reply) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(forward) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(save) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(send) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; + esac + ;; +esac +;; +(manual) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(completion) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; +(help) +_arguments "${_arguments_options[@]}" \ +&& ret=0 +;; + esac + ;; +esac +;; + esac + ;; +esac +} + +(( $+functions[_himalaya_commands] )) || +_himalaya_commands() { + local commands; commands=( +'account:Manage accounts' \ +'folder:Manage folders' \ +'mailbox:Manage folders' \ +'envelope:Manage envelopes' \ +'flag:Manage flags' \ +'message:Manage messages' \ +'attachment:Manage attachments' \ +'template:Manage templates' \ +'manual:Generate manual pages to a directory' \ +'completion:Print completion script for a shell to stdout' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'himalaya commands' commands "$@" +} +(( $+functions[_himalaya__account_commands] )) || +_himalaya__account_commands() { + local commands; commands=( +'check-up:Check up the given account' \ +'configure:Configure an account' \ +'list:List all accounts' \ +'sync:Synchronize an account' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'himalaya account commands' commands "$@" +} +(( $+functions[_himalaya__help__account_commands] )) || +_himalaya__help__account_commands() { + local commands; commands=( +'check-up:Check up the given account' \ +'configure:Configure an account' \ +'list:List all accounts' \ +'sync:Synchronize an account' \ + ) + _describe -t commands 'himalaya help account commands' commands "$@" +} +(( $+functions[_himalaya__flag__add_commands] )) || +_himalaya__flag__add_commands() { + local commands; commands=() + _describe -t commands 'himalaya flag add commands' commands "$@" +} +(( $+functions[_himalaya__flag__help__add_commands] )) || +_himalaya__flag__help__add_commands() { + local commands; commands=() + _describe -t commands 'himalaya flag help add commands' commands "$@" +} +(( $+functions[_himalaya__folder__add_commands] )) || +_himalaya__folder__add_commands() { + local commands; commands=() + _describe -t commands 'himalaya folder add commands' commands "$@" +} +(( $+functions[_himalaya__folder__help__add_commands] )) || +_himalaya__folder__help__add_commands() { + local commands; commands=() + _describe -t commands 'himalaya folder help add commands' commands "$@" +} +(( $+functions[_himalaya__help__flag__add_commands] )) || +_himalaya__help__flag__add_commands() { + local commands; commands=() + _describe -t commands 'himalaya help flag add commands' commands "$@" +} +(( $+functions[_himalaya__help__folder__add_commands] )) || +_himalaya__help__folder__add_commands() { + local commands; commands=() + _describe -t commands 'himalaya help folder add commands' commands "$@" +} +(( $+functions[_himalaya__attachment_commands] )) || +_himalaya__attachment_commands() { + local commands; commands=( +'download:Download all attachments for the given message' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'himalaya attachment commands' commands "$@" +} +(( $+functions[_himalaya__help__attachment_commands] )) || +_himalaya__help__attachment_commands() { + local commands; commands=( +'download:Download all attachments for the given message' \ + ) + _describe -t commands 'himalaya help attachment commands' commands "$@" +} +(( $+functions[_himalaya__account__check-up_commands] )) || +_himalaya__account__check-up_commands() { + local commands; commands=() + _describe -t commands 'himalaya account check-up commands' commands "$@" +} +(( $+functions[_himalaya__account__help__check-up_commands] )) || +_himalaya__account__help__check-up_commands() { + local commands; commands=() + _describe -t commands 'himalaya account help check-up commands' commands "$@" +} +(( $+functions[_himalaya__help__account__check-up_commands] )) || +_himalaya__help__account__check-up_commands() { + local commands; commands=() + _describe -t commands 'himalaya help account check-up commands' commands "$@" +} +(( $+functions[_himalaya__completion_commands] )) || +_himalaya__completion_commands() { + local commands; commands=() + _describe -t commands 'himalaya completion commands' commands "$@" +} +(( $+functions[_himalaya__help__completion_commands] )) || +_himalaya__help__completion_commands() { + local commands; commands=() + _describe -t commands 'himalaya help completion commands' commands "$@" +} +(( $+functions[_himalaya__account__configure_commands] )) || +_himalaya__account__configure_commands() { + local commands; commands=() + _describe -t commands 'himalaya account configure commands' commands "$@" +} +(( $+functions[_himalaya__account__help__configure_commands] )) || +_himalaya__account__help__configure_commands() { + local commands; commands=() + _describe -t commands 'himalaya account help configure commands' commands "$@" +} +(( $+functions[_himalaya__help__account__configure_commands] )) || +_himalaya__help__account__configure_commands() { + local commands; commands=() + _describe -t commands 'himalaya help account configure commands' commands "$@" +} +(( $+functions[_himalaya__help__message__copy_commands] )) || +_himalaya__help__message__copy_commands() { + local commands; commands=() + _describe -t commands 'himalaya help message copy commands' commands "$@" +} +(( $+functions[_himalaya__message__copy_commands] )) || +_himalaya__message__copy_commands() { + local commands; commands=() + _describe -t commands 'himalaya message copy commands' commands "$@" +} +(( $+functions[_himalaya__message__help__copy_commands] )) || +_himalaya__message__help__copy_commands() { + local commands; commands=() + _describe -t commands 'himalaya message help copy commands' commands "$@" +} +(( $+functions[_himalaya__folder__delete_commands] )) || +_himalaya__folder__delete_commands() { + local commands; commands=() + _describe -t commands 'himalaya folder delete commands' commands "$@" +} +(( $+functions[_himalaya__folder__help__delete_commands] )) || +_himalaya__folder__help__delete_commands() { + local commands; commands=() + _describe -t commands 'himalaya folder help delete commands' commands "$@" +} +(( $+functions[_himalaya__help__folder__delete_commands] )) || +_himalaya__help__folder__delete_commands() { + local commands; commands=() + _describe -t commands 'himalaya help folder delete commands' commands "$@" +} +(( $+functions[_himalaya__help__message__delete_commands] )) || +_himalaya__help__message__delete_commands() { + local commands; commands=() + _describe -t commands 'himalaya help message delete commands' commands "$@" +} +(( $+functions[_himalaya__message__delete_commands] )) || +_himalaya__message__delete_commands() { + local commands; commands=() + _describe -t commands 'himalaya message delete commands' commands "$@" +} +(( $+functions[_himalaya__message__help__delete_commands] )) || +_himalaya__message__help__delete_commands() { + local commands; commands=() + _describe -t commands 'himalaya message help delete commands' commands "$@" +} +(( $+functions[_himalaya__attachment__download_commands] )) || +_himalaya__attachment__download_commands() { + local commands; commands=() + _describe -t commands 'himalaya attachment download commands' commands "$@" +} +(( $+functions[_himalaya__attachment__help__download_commands] )) || +_himalaya__attachment__help__download_commands() { + local commands; commands=() + _describe -t commands 'himalaya attachment help download commands' commands "$@" +} +(( $+functions[_himalaya__help__attachment__download_commands] )) || +_himalaya__help__attachment__download_commands() { + local commands; commands=() + _describe -t commands 'himalaya help attachment download commands' commands "$@" +} +(( $+functions[_himalaya__envelope_commands] )) || +_himalaya__envelope_commands() { + local commands; commands=( +'list:List all envelopes' \ +'watch:Watch envelopes for changes' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'himalaya envelope commands' commands "$@" +} +(( $+functions[_himalaya__help__envelope_commands] )) || +_himalaya__help__envelope_commands() { + local commands; commands=( +'list:List all envelopes' \ +'watch:Watch envelopes for changes' \ + ) + _describe -t commands 'himalaya help envelope commands' commands "$@" +} +(( $+functions[_himalaya__folder__expunge_commands] )) || +_himalaya__folder__expunge_commands() { + local commands; commands=() + _describe -t commands 'himalaya folder expunge commands' commands "$@" +} +(( $+functions[_himalaya__folder__help__expunge_commands] )) || +_himalaya__folder__help__expunge_commands() { + local commands; commands=() + _describe -t commands 'himalaya folder help expunge commands' commands "$@" +} +(( $+functions[_himalaya__help__folder__expunge_commands] )) || +_himalaya__help__folder__expunge_commands() { + local commands; commands=() + _describe -t commands 'himalaya help folder expunge commands' commands "$@" +} +(( $+functions[_himalaya__flag_commands] )) || +_himalaya__flag_commands() { + local commands; commands=( +'add:Add flag(s) to an envelope' \ +'set:Replace flag(s) of an envelope' \ +'remove:Remove flag(s) from an envelope' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'himalaya flag commands' commands "$@" +} +(( $+functions[_himalaya__help__flag_commands] )) || +_himalaya__help__flag_commands() { + local commands; commands=( +'add:Add flag(s) to an envelope' \ +'set:Replace flag(s) of an envelope' \ +'remove:Remove flag(s) from an envelope' \ + ) + _describe -t commands 'himalaya help flag commands' commands "$@" +} +(( $+functions[_himalaya__folder_commands] )) || +_himalaya__folder_commands() { + local commands; commands=( +'add:Create a new folder' \ +'create:Create a new folder' \ +'list:List all folders' \ +'expunge:Expunge a folder' \ +'purge:Purge a folder' \ +'delete:Delete a folder' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'himalaya folder commands' commands "$@" +} +(( $+functions[_himalaya__help__folder_commands] )) || +_himalaya__help__folder_commands() { + local commands; commands=( +'add:Create a new folder' \ +'list:List all folders' \ +'expunge:Expunge a folder' \ +'purge:Purge a folder' \ +'delete:Delete a folder' \ + ) + _describe -t commands 'himalaya help folder commands' commands "$@" +} +(( $+functions[_himalaya__help__message__forward_commands] )) || +_himalaya__help__message__forward_commands() { + local commands; commands=() + _describe -t commands 'himalaya help message forward commands' commands "$@" +} +(( $+functions[_himalaya__help__template__forward_commands] )) || +_himalaya__help__template__forward_commands() { + local commands; commands=() + _describe -t commands 'himalaya help template forward commands' commands "$@" +} +(( $+functions[_himalaya__message__forward_commands] )) || +_himalaya__message__forward_commands() { + local commands; commands=() + _describe -t commands 'himalaya message forward commands' commands "$@" +} +(( $+functions[_himalaya__message__help__forward_commands] )) || +_himalaya__message__help__forward_commands() { + local commands; commands=() + _describe -t commands 'himalaya message help forward commands' commands "$@" +} +(( $+functions[_himalaya__template__forward_commands] )) || +_himalaya__template__forward_commands() { + local commands; commands=() + _describe -t commands 'himalaya template forward commands' commands "$@" +} +(( $+functions[_himalaya__template__help__forward_commands] )) || +_himalaya__template__help__forward_commands() { + local commands; commands=() + _describe -t commands 'himalaya template help forward commands' commands "$@" +} +(( $+functions[_himalaya__account__help_commands] )) || +_himalaya__account__help_commands() { + local commands; commands=( +'check-up:Check up the given account' \ +'configure:Configure an account' \ +'list:List all accounts' \ +'sync:Synchronize an account' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'himalaya account help commands' commands "$@" +} +(( $+functions[_himalaya__account__help__help_commands] )) || +_himalaya__account__help__help_commands() { + local commands; commands=() + _describe -t commands 'himalaya account help help commands' commands "$@" +} +(( $+functions[_himalaya__attachment__help_commands] )) || +_himalaya__attachment__help_commands() { + local commands; commands=( +'download:Download all attachments for the given message' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'himalaya attachment help commands' commands "$@" +} +(( $+functions[_himalaya__attachment__help__help_commands] )) || +_himalaya__attachment__help__help_commands() { + local commands; commands=() + _describe -t commands 'himalaya attachment help help commands' commands "$@" +} +(( $+functions[_himalaya__envelope__help_commands] )) || +_himalaya__envelope__help_commands() { + local commands; commands=( +'list:List all envelopes' \ +'watch:Watch envelopes for changes' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'himalaya envelope help commands' commands "$@" +} +(( $+functions[_himalaya__envelope__help__help_commands] )) || +_himalaya__envelope__help__help_commands() { + local commands; commands=() + _describe -t commands 'himalaya envelope help help commands' commands "$@" +} +(( $+functions[_himalaya__flag__help_commands] )) || +_himalaya__flag__help_commands() { + local commands; commands=( +'add:Add flag(s) to an envelope' \ +'set:Replace flag(s) of an envelope' \ +'remove:Remove flag(s) from an envelope' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'himalaya flag help commands' commands "$@" +} +(( $+functions[_himalaya__flag__help__help_commands] )) || +_himalaya__flag__help__help_commands() { + local commands; commands=() + _describe -t commands 'himalaya flag help help commands' commands "$@" +} +(( $+functions[_himalaya__folder__help_commands] )) || +_himalaya__folder__help_commands() { + local commands; commands=( +'add:Create a new folder' \ +'list:List all folders' \ +'expunge:Expunge a folder' \ +'purge:Purge a folder' \ +'delete:Delete a folder' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'himalaya folder help commands' commands "$@" +} +(( $+functions[_himalaya__folder__help__help_commands] )) || +_himalaya__folder__help__help_commands() { + local commands; commands=() + _describe -t commands 'himalaya folder help help commands' commands "$@" +} +(( $+functions[_himalaya__help_commands] )) || +_himalaya__help_commands() { + local commands; commands=( +'account:Manage accounts' \ +'folder:Manage folders' \ +'envelope:Manage envelopes' \ +'flag:Manage flags' \ +'message:Manage messages' \ +'attachment:Manage attachments' \ +'template:Manage templates' \ +'manual:Generate manual pages to a directory' \ +'completion:Print completion script for a shell to stdout' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'himalaya help commands' commands "$@" +} +(( $+functions[_himalaya__help__help_commands] )) || +_himalaya__help__help_commands() { + local commands; commands=() + _describe -t commands 'himalaya help help commands' commands "$@" +} +(( $+functions[_himalaya__message__help_commands] )) || +_himalaya__message__help_commands() { + local commands; commands=( +'read:Read a message' \ +'write:Write a new message' \ +'reply:Reply to a message' \ +'forward:Forward a message' \ +'mailto:Parse and edit a message from a mailto URL string' \ +'save:Save a message to a folder' \ +'send:Send a message' \ +'copy:Copy a message from a source folder to a target folder' \ +'move:Move a message from a source folder to a target folder' \ +'delete:Mark as deleted a message from a folder' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'himalaya message help commands' commands "$@" +} +(( $+functions[_himalaya__message__help__help_commands] )) || +_himalaya__message__help__help_commands() { + local commands; commands=() + _describe -t commands 'himalaya message help help commands' commands "$@" +} +(( $+functions[_himalaya__template__help_commands] )) || +_himalaya__template__help_commands() { + local commands; commands=( +'write:Generate a template for writing a new message from scratch' \ +'reply:Generate a template for replying to a message' \ +'forward:Generate a template for forwarding a message' \ +'save:Save a template to a folder' \ +'send:Send a template' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'himalaya template help commands' commands "$@" +} +(( $+functions[_himalaya__template__help__help_commands] )) || +_himalaya__template__help__help_commands() { + local commands; commands=() + _describe -t commands 'himalaya template help help commands' commands "$@" +} +(( $+functions[_himalaya__account__help__list_commands] )) || +_himalaya__account__help__list_commands() { + local commands; commands=() + _describe -t commands 'himalaya account help list commands' commands "$@" +} +(( $+functions[_himalaya__account__list_commands] )) || +_himalaya__account__list_commands() { + local commands; commands=() + _describe -t commands 'himalaya account list commands' commands "$@" +} +(( $+functions[_himalaya__envelope__help__list_commands] )) || +_himalaya__envelope__help__list_commands() { + local commands; commands=() + _describe -t commands 'himalaya envelope help list commands' commands "$@" +} +(( $+functions[_himalaya__envelope__list_commands] )) || +_himalaya__envelope__list_commands() { + local commands; commands=() + _describe -t commands 'himalaya envelope list commands' commands "$@" +} +(( $+functions[_himalaya__folder__help__list_commands] )) || +_himalaya__folder__help__list_commands() { + local commands; commands=() + _describe -t commands 'himalaya folder help list commands' commands "$@" +} +(( $+functions[_himalaya__folder__list_commands] )) || +_himalaya__folder__list_commands() { + local commands; commands=() + _describe -t commands 'himalaya folder list commands' commands "$@" +} +(( $+functions[_himalaya__help__account__list_commands] )) || +_himalaya__help__account__list_commands() { + local commands; commands=() + _describe -t commands 'himalaya help account list commands' commands "$@" +} +(( $+functions[_himalaya__help__envelope__list_commands] )) || +_himalaya__help__envelope__list_commands() { + local commands; commands=() + _describe -t commands 'himalaya help envelope list commands' commands "$@" +} +(( $+functions[_himalaya__help__folder__list_commands] )) || +_himalaya__help__folder__list_commands() { + local commands; commands=() + _describe -t commands 'himalaya help folder list commands' commands "$@" +} +(( $+functions[_himalaya__help__message__mailto_commands] )) || +_himalaya__help__message__mailto_commands() { + local commands; commands=() + _describe -t commands 'himalaya help message mailto commands' commands "$@" +} +(( $+functions[_himalaya__message__help__mailto_commands] )) || +_himalaya__message__help__mailto_commands() { + local commands; commands=() + _describe -t commands 'himalaya message help mailto commands' commands "$@" +} +(( $+functions[_himalaya__message__mailto_commands] )) || +_himalaya__message__mailto_commands() { + local commands; commands=() + _describe -t commands 'himalaya message mailto commands' commands "$@" +} +(( $+functions[_himalaya__help__manual_commands] )) || +_himalaya__help__manual_commands() { + local commands; commands=() + _describe -t commands 'himalaya help manual commands' commands "$@" +} +(( $+functions[_himalaya__manual_commands] )) || +_himalaya__manual_commands() { + local commands; commands=() + _describe -t commands 'himalaya manual commands' commands "$@" +} +(( $+functions[_himalaya__help__message_commands] )) || +_himalaya__help__message_commands() { + local commands; commands=( +'read:Read a message' \ +'write:Write a new message' \ +'reply:Reply to a message' \ +'forward:Forward a message' \ +'mailto:Parse and edit a message from a mailto URL string' \ +'save:Save a message to a folder' \ +'send:Send a message' \ +'copy:Copy a message from a source folder to a target folder' \ +'move:Move a message from a source folder to a target folder' \ +'delete:Mark as deleted a message from a folder' \ + ) + _describe -t commands 'himalaya help message commands' commands "$@" +} +(( $+functions[_himalaya__message_commands] )) || +_himalaya__message_commands() { + local commands; commands=( +'read:Read a message' \ +'write:Write a new message' \ +'reply:Reply to a message' \ +'forward:Forward a message' \ +'mailto:Parse and edit a message from a mailto URL string' \ +'save:Save a message to a folder' \ +'send:Send a message' \ +'copy:Copy a message from a source folder to a target folder' \ +'move:Move a message from a source folder to a target folder' \ +'delete:Mark as deleted a message from a folder' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'himalaya message commands' commands "$@" +} +(( $+functions[_himalaya__help__message__move_commands] )) || +_himalaya__help__message__move_commands() { + local commands; commands=() + _describe -t commands 'himalaya help message move commands' commands "$@" +} +(( $+functions[_himalaya__message__help__move_commands] )) || +_himalaya__message__help__move_commands() { + local commands; commands=() + _describe -t commands 'himalaya message help move commands' commands "$@" +} +(( $+functions[_himalaya__message__move_commands] )) || +_himalaya__message__move_commands() { + local commands; commands=() + _describe -t commands 'himalaya message move commands' commands "$@" +} +(( $+functions[_himalaya__folder__help__purge_commands] )) || +_himalaya__folder__help__purge_commands() { + local commands; commands=() + _describe -t commands 'himalaya folder help purge commands' commands "$@" +} +(( $+functions[_himalaya__folder__purge_commands] )) || +_himalaya__folder__purge_commands() { + local commands; commands=() + _describe -t commands 'himalaya folder purge commands' commands "$@" +} +(( $+functions[_himalaya__help__folder__purge_commands] )) || +_himalaya__help__folder__purge_commands() { + local commands; commands=() + _describe -t commands 'himalaya help folder purge commands' commands "$@" +} +(( $+functions[_himalaya__help__message__read_commands] )) || +_himalaya__help__message__read_commands() { + local commands; commands=() + _describe -t commands 'himalaya help message read commands' commands "$@" +} +(( $+functions[_himalaya__message__help__read_commands] )) || +_himalaya__message__help__read_commands() { + local commands; commands=() + _describe -t commands 'himalaya message help read commands' commands "$@" +} +(( $+functions[_himalaya__message__read_commands] )) || +_himalaya__message__read_commands() { + local commands; commands=() + _describe -t commands 'himalaya message read commands' commands "$@" +} +(( $+functions[_himalaya__flag__help__remove_commands] )) || +_himalaya__flag__help__remove_commands() { + local commands; commands=() + _describe -t commands 'himalaya flag help remove commands' commands "$@" +} +(( $+functions[_himalaya__flag__remove_commands] )) || +_himalaya__flag__remove_commands() { + local commands; commands=() + _describe -t commands 'himalaya flag remove commands' commands "$@" +} +(( $+functions[_himalaya__help__flag__remove_commands] )) || +_himalaya__help__flag__remove_commands() { + local commands; commands=() + _describe -t commands 'himalaya help flag remove commands' commands "$@" +} +(( $+functions[_himalaya__help__message__reply_commands] )) || +_himalaya__help__message__reply_commands() { + local commands; commands=() + _describe -t commands 'himalaya help message reply commands' commands "$@" +} +(( $+functions[_himalaya__help__template__reply_commands] )) || +_himalaya__help__template__reply_commands() { + local commands; commands=() + _describe -t commands 'himalaya help template reply commands' commands "$@" +} +(( $+functions[_himalaya__message__help__reply_commands] )) || +_himalaya__message__help__reply_commands() { + local commands; commands=() + _describe -t commands 'himalaya message help reply commands' commands "$@" +} +(( $+functions[_himalaya__message__reply_commands] )) || +_himalaya__message__reply_commands() { + local commands; commands=() + _describe -t commands 'himalaya message reply commands' commands "$@" +} +(( $+functions[_himalaya__template__help__reply_commands] )) || +_himalaya__template__help__reply_commands() { + local commands; commands=() + _describe -t commands 'himalaya template help reply commands' commands "$@" +} +(( $+functions[_himalaya__template__reply_commands] )) || +_himalaya__template__reply_commands() { + local commands; commands=() + _describe -t commands 'himalaya template reply commands' commands "$@" +} +(( $+functions[_himalaya__help__message__save_commands] )) || +_himalaya__help__message__save_commands() { + local commands; commands=() + _describe -t commands 'himalaya help message save commands' commands "$@" +} +(( $+functions[_himalaya__help__template__save_commands] )) || +_himalaya__help__template__save_commands() { + local commands; commands=() + _describe -t commands 'himalaya help template save commands' commands "$@" +} +(( $+functions[_himalaya__message__help__save_commands] )) || +_himalaya__message__help__save_commands() { + local commands; commands=() + _describe -t commands 'himalaya message help save commands' commands "$@" +} +(( $+functions[_himalaya__message__save_commands] )) || +_himalaya__message__save_commands() { + local commands; commands=() + _describe -t commands 'himalaya message save commands' commands "$@" +} +(( $+functions[_himalaya__template__help__save_commands] )) || +_himalaya__template__help__save_commands() { + local commands; commands=() + _describe -t commands 'himalaya template help save commands' commands "$@" +} +(( $+functions[_himalaya__template__save_commands] )) || +_himalaya__template__save_commands() { + local commands; commands=() + _describe -t commands 'himalaya template save commands' commands "$@" +} +(( $+functions[_himalaya__help__message__send_commands] )) || +_himalaya__help__message__send_commands() { + local commands; commands=() + _describe -t commands 'himalaya help message send commands' commands "$@" +} +(( $+functions[_himalaya__help__template__send_commands] )) || +_himalaya__help__template__send_commands() { + local commands; commands=() + _describe -t commands 'himalaya help template send commands' commands "$@" +} +(( $+functions[_himalaya__message__help__send_commands] )) || +_himalaya__message__help__send_commands() { + local commands; commands=() + _describe -t commands 'himalaya message help send commands' commands "$@" +} +(( $+functions[_himalaya__message__send_commands] )) || +_himalaya__message__send_commands() { + local commands; commands=() + _describe -t commands 'himalaya message send commands' commands "$@" +} +(( $+functions[_himalaya__template__help__send_commands] )) || +_himalaya__template__help__send_commands() { + local commands; commands=() + _describe -t commands 'himalaya template help send commands' commands "$@" +} +(( $+functions[_himalaya__template__send_commands] )) || +_himalaya__template__send_commands() { + local commands; commands=() + _describe -t commands 'himalaya template send commands' commands "$@" +} +(( $+functions[_himalaya__flag__help__set_commands] )) || +_himalaya__flag__help__set_commands() { + local commands; commands=() + _describe -t commands 'himalaya flag help set commands' commands "$@" +} +(( $+functions[_himalaya__flag__set_commands] )) || +_himalaya__flag__set_commands() { + local commands; commands=() + _describe -t commands 'himalaya flag set commands' commands "$@" +} +(( $+functions[_himalaya__help__flag__set_commands] )) || +_himalaya__help__flag__set_commands() { + local commands; commands=() + _describe -t commands 'himalaya help flag set commands' commands "$@" +} +(( $+functions[_himalaya__account__help__sync_commands] )) || +_himalaya__account__help__sync_commands() { + local commands; commands=() + _describe -t commands 'himalaya account help sync commands' commands "$@" +} +(( $+functions[_himalaya__account__sync_commands] )) || +_himalaya__account__sync_commands() { + local commands; commands=() + _describe -t commands 'himalaya account sync commands' commands "$@" +} +(( $+functions[_himalaya__help__account__sync_commands] )) || +_himalaya__help__account__sync_commands() { + local commands; commands=() + _describe -t commands 'himalaya help account sync commands' commands "$@" +} +(( $+functions[_himalaya__help__template_commands] )) || +_himalaya__help__template_commands() { + local commands; commands=( +'write:Generate a template for writing a new message from scratch' \ +'reply:Generate a template for replying to a message' \ +'forward:Generate a template for forwarding a message' \ +'save:Save a template to a folder' \ +'send:Send a template' \ + ) + _describe -t commands 'himalaya help template commands' commands "$@" +} +(( $+functions[_himalaya__template_commands] )) || +_himalaya__template_commands() { + local commands; commands=( +'write:Generate a template for writing a new message from scratch' \ +'reply:Generate a template for replying to a message' \ +'forward:Generate a template for forwarding a message' \ +'save:Save a template to a folder' \ +'send:Send a template' \ +'help:Print this message or the help of the given subcommand(s)' \ + ) + _describe -t commands 'himalaya template commands' commands "$@" +} +(( $+functions[_himalaya__envelope__help__watch_commands] )) || +_himalaya__envelope__help__watch_commands() { + local commands; commands=() + _describe -t commands 'himalaya envelope help watch commands' commands "$@" +} +(( $+functions[_himalaya__envelope__watch_commands] )) || +_himalaya__envelope__watch_commands() { + local commands; commands=() + _describe -t commands 'himalaya envelope watch commands' commands "$@" +} +(( $+functions[_himalaya__help__envelope__watch_commands] )) || +_himalaya__help__envelope__watch_commands() { + local commands; commands=() + _describe -t commands 'himalaya help envelope watch commands' commands "$@" +} +(( $+functions[_himalaya__help__message__write_commands] )) || +_himalaya__help__message__write_commands() { + local commands; commands=() + _describe -t commands 'himalaya help message write commands' commands "$@" +} +(( $+functions[_himalaya__help__template__write_commands] )) || +_himalaya__help__template__write_commands() { + local commands; commands=() + _describe -t commands 'himalaya help template write commands' commands "$@" +} +(( $+functions[_himalaya__message__help__write_commands] )) || +_himalaya__message__help__write_commands() { + local commands; commands=() + _describe -t commands 'himalaya message help write commands' commands "$@" +} +(( $+functions[_himalaya__message__write_commands] )) || +_himalaya__message__write_commands() { + local commands; commands=() + _describe -t commands 'himalaya message write commands' commands "$@" +} +(( $+functions[_himalaya__template__help__write_commands] )) || +_himalaya__template__help__write_commands() { + local commands; commands=() + _describe -t commands 'himalaya template help write commands' commands "$@" +} +(( $+functions[_himalaya__template__write_commands] )) || +_himalaya__template__write_commands() { + local commands; commands=() + _describe -t commands 'himalaya template write commands' commands "$@" +} + +if [ "$funcstack[1]" = "_himalaya" ]; then + _himalaya "$@" +else + compdef _himalaya himalaya +fi diff --git a/dot_config/zsh/completions/_klog.zsh b/dot_config/zsh/completions/_klog.zsh new file mode 100644 index 0000000000000000000000000000000000000000..555ca74a66e1acfc048eac89c72561a94a3de676 --- /dev/null +++ b/dot_config/zsh/completions/_klog.zsh @@ -0,0 +1,2 @@ +autoload -U +X bashcompinit && bashcompinit +complete -o default -o bashdefault -C /usr/bin/klog klog diff --git a/dot_config/zsh/completions/_starship.zsh b/dot_config/zsh/completions/_starship.zsh new file mode 100644 index 0000000000000000000000000000000000000000..00714ab3c5122d671f53ab77b6848551d8bcc873 --- /dev/null +++ b/dot_config/zsh/completions/_starship.zsh @@ -0,0 +1 @@ +source <(/usr/bin/starship init zsh --print-full-init) \ No newline at end of file