#compdef bootstrap autoload -U is-at-least _bootstrap() { 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[@]}" \ '-p+[The directory path under which to install]: : ' \ '--prefix=[The directory path under which to install]: : ' \ '-u[Use /usr]' \ '--usr[Use /usr]' \ '-s[Install soft links instead of hardlinks]' \ '--soft[Install soft links instead of hardlinks]' \ '-h[Print help (see more with '\''--help'\'')]' \ '--help[Print help (see more with '\''--help'\'')]' \ '-V[Print version]' \ '--version[Print version]' \ ":: :_bootstrap_commands" \ "*::: :->bootstrap" \ && ret=0 case $state in (bootstrap) words=($line[1] "${words[@]}") (( CURRENT += 1 )) curcontext="${curcontext%:*:*}:bootstrap-command-$line[1]:" case $line[1] in (all) _arguments "${_arguments_options[@]}" \ '-s[Install soft links instead of hardlinks]' \ '--soft[Install soft links instead of hardlinks]' \ '(-b --bash -f --fish -n --nu -p --pwsh -z --zsh)-a[Install completions for all supported shells]' \ '(-b --bash -f --fish -n --nu -p --pwsh -z --zsh)--all[Install completions for all supported shells]' \ '-b[Bash shell completions]' \ '--bash[Bash shell completions]' \ '-f[Fish shell completions]' \ '--fish[Fish shell completions]' \ '-n[Nushell completions]' \ '--nu[Nushell completions]' \ '-p[PowerShell completions]' \ '--pwsh[PowerShell completions]' \ '-z[Zshell completions]' \ '--zsh[Zshell completions]' \ '-h[Print help]' \ '--help[Print help]' \ && ret=0 ;; (links) _arguments "${_arguments_options[@]}" \ '-s[Install soft links instead of hardlinks]' \ '--soft[Install soft links instead of hardlinks]' \ '-h[Print help]' \ '--help[Print help]' \ && ret=0 ;; (manpages) _arguments "${_arguments_options[@]}" \ '-h[Print help]' \ '--help[Print help]' \ && ret=0 ;; (completions) _arguments "${_arguments_options[@]}" \ '-a[Install completions for all supported shells]' \ '--all[Install completions for all supported shells]' \ '-b[Bash shell completions]' \ '--bash[Bash shell completions]' \ '-f[Fish shell completions]' \ '--fish[Fish shell completions]' \ '-n[Nushell completions]' \ '--nu[Nushell completions]' \ '-p[PowerShell completions]' \ '--pwsh[PowerShell completions]' \ '-z[Zshell completions]' \ '--zsh[Zshell completions]' \ '-h[Print help]' \ '--help[Print help]' \ && ret=0 ;; (help) _arguments "${_arguments_options[@]}" \ ":: :_bootstrap__help_commands" \ "*::: :->help" \ && ret=0 case $state in (help) words=($line[1] "${words[@]}") (( CURRENT += 1 )) curcontext="${curcontext%:*:*}:bootstrap-help-command-$line[1]:" case $line[1] in (all) _arguments "${_arguments_options[@]}" \ && ret=0 ;; (links) _arguments "${_arguments_options[@]}" \ && ret=0 ;; (manpages) _arguments "${_arguments_options[@]}" \ && ret=0 ;; (completions) _arguments "${_arguments_options[@]}" \ && ret=0 ;; (help) _arguments "${_arguments_options[@]}" \ && ret=0 ;; esac ;; esac ;; esac ;; esac } (( $+functions[_bootstrap_commands] )) || _bootstrap_commands() { local commands; commands=( 'all:Install everything' \ 'links:Install links for each applet' \ 'manpages:Install Unix man pages' \ 'completions:Install shell completions' \ 'help:Print this message or the help of the given subcommand(s)' \ ) _describe -t commands 'bootstrap commands' commands "$@" } (( $+functions[_bootstrap__all_commands] )) || _bootstrap__all_commands() { local commands; commands=() _describe -t commands 'bootstrap all commands' commands "$@" } (( $+functions[_bootstrap__help__all_commands] )) || _bootstrap__help__all_commands() { local commands; commands=() _describe -t commands 'bootstrap help all commands' commands "$@" } (( $+functions[_bootstrap__completions_commands] )) || _bootstrap__completions_commands() { local commands; commands=() _describe -t commands 'bootstrap completions commands' commands "$@" } (( $+functions[_bootstrap__help__completions_commands] )) || _bootstrap__help__completions_commands() { local commands; commands=() _describe -t commands 'bootstrap help completions commands' commands "$@" } (( $+functions[_bootstrap__help_commands] )) || _bootstrap__help_commands() { local commands; commands=( 'all:Install everything' \ 'links:Install links for each applet' \ 'manpages:Install Unix man pages' \ 'completions:Install shell completions' \ 'help:Print this message or the help of the given subcommand(s)' \ ) _describe -t commands 'bootstrap help commands' commands "$@" } (( $+functions[_bootstrap__help__help_commands] )) || _bootstrap__help__help_commands() { local commands; commands=() _describe -t commands 'bootstrap help help commands' commands "$@" } (( $+functions[_bootstrap__help__links_commands] )) || _bootstrap__help__links_commands() { local commands; commands=() _describe -t commands 'bootstrap help links commands' commands "$@" } (( $+functions[_bootstrap__links_commands] )) || _bootstrap__links_commands() { local commands; commands=() _describe -t commands 'bootstrap links commands' commands "$@" } (( $+functions[_bootstrap__help__manpages_commands] )) || _bootstrap__help__manpages_commands() { local commands; commands=() _describe -t commands 'bootstrap help manpages commands' commands "$@" } (( $+functions[_bootstrap__manpages_commands] )) || _bootstrap__manpages_commands() { local commands; commands=() _describe -t commands 'bootstrap manpages commands' commands "$@" } _bootstrap "$@"