#compdef smith
autoload -U +X bashcompinit && bashcompinit
typeset -gA _smith_subs _smith_flags
_smith_subs["smith"]="auth repo issue pr run release label milestone workflow secret variable search status notification ssh-key gpg-key org alias config api browse completion help"
_smith_flags["smith"]="--version -V"
_smith_subs["smith auth"]="login status switch logout token setup-git git-credential"
_smith_flags["smith auth"]=""
_smith_subs["smith auth login"]=""
_smith_flags["smith auth login"]="--hostname --web -w --password --user -u --with-token --client-id --git-protocol -p --ssh-host --scheme --insecure-storage --skip-ssh-key"
_smith_subs["smith auth status"]=""
_smith_flags["smith auth status"]="--hostname --show-token -t"
_smith_subs["smith auth switch"]=""
_smith_flags["smith auth switch"]="--hostname --user -u"
_smith_subs["smith auth logout"]=""
_smith_flags["smith auth logout"]="--hostname --user -u"
_smith_subs["smith auth token"]=""
_smith_flags["smith auth token"]="--hostname --user -u"
_smith_subs["smith auth setup-git"]=""
_smith_flags["smith auth setup-git"]="--hostname"
_smith_subs["smith auth git-credential"]=""
_smith_flags["smith auth git-credential"]=""
_smith_subs["smith repo"]="clone view create fork edit sync archive unarchive delete set-default list"
_smith_flags["smith repo"]=""
_smith_subs["smith repo clone"]=""
_smith_flags["smith repo clone"]="--upstream-remote-name -u"
_smith_subs["smith repo view"]=""
_smith_flags["smith repo view"]="--web -w --json --repo -R --jq -q --template -t"
_smith_subs["smith repo create"]=""
_smith_flags["smith repo create"]="--public --private --description -d --homepage --add-readme --gitignore -g --license -l --default-branch --clone -c --source -s --remote -r --push --hostname"
_smith_subs["smith repo fork"]=""
_smith_flags["smith repo fork"]="--clone --remote --org --fork-name --repo -R"
_smith_subs["smith repo edit"]=""
_smith_flags["smith repo edit"]="--description -d --homepage --default-branch --visibility --merge-style --delete-branch-on-merge --template --enable-issues --disable-issues --enable-wiki --disable-wiki --enable-pull-requests --disable-pull-requests --enable-actions --disable-actions --enable-releases --disable-releases --enable-projects --disable-projects --enable-packages --disable-packages --repo -R"
_smith_subs["smith repo sync"]=""
_smith_flags["smith repo sync"]="--branch -b --repo -R"
_smith_subs["smith repo archive"]=""
_smith_flags["smith repo archive"]="--yes -y --repo -R"
_smith_subs["smith repo unarchive"]=""
_smith_flags["smith repo unarchive"]="--yes -y --repo -R"
_smith_subs["smith repo delete"]=""
_smith_flags["smith repo delete"]="--yes -y --repo -R"
_smith_subs["smith repo set-default"]=""
_smith_flags["smith repo set-default"]="--view -v --unset -u"
_smith_subs["smith repo list"]=""
_smith_flags["smith repo list"]="--fork --source --visibility --language -l --topic --archived --no-archived --limit -L --json --hostname --jq -q --template -t"
_smith_subs["smith issue"]="list view create close reopen comment edit"
_smith_flags["smith issue"]=""
_smith_subs["smith issue list"]=""
_smith_flags["smith issue list"]="--state -s --label -l --assignee -a --author -A --mention --milestone -m --search -S --limit -L --json --web -w --repo -R --jq -q --template -t"
_smith_subs["smith issue view"]=""
_smith_flags["smith issue view"]="--comments -c --json --web -w --repo -R --jq -q --template -t"
_smith_subs["smith issue create"]=""
_smith_flags["smith issue create"]="--title -t --body -b --body-file -F --label -l --assignee -a --milestone -m --web -w --repo -R"
_smith_subs["smith issue close"]=""
_smith_flags["smith issue close"]="--comment -c --repo -R"
_smith_subs["smith issue reopen"]=""
_smith_flags["smith issue reopen"]="--comment -c --repo -R"
_smith_subs["smith issue comment"]=""
_smith_flags["smith issue comment"]="--body -b --body-file -F --repo -R"
_smith_subs["smith issue edit"]=""
_smith_flags["smith issue edit"]="--title -t --body -b --body-file -F --add-label --remove-label --add-assignee --remove-assignee --milestone -m --repo -R"
_smith_subs["smith pr"]="list view diff create checkout merge close reopen comment ready edit review update-branch status checks"
_smith_flags["smith pr"]=""
_smith_subs["smith pr list"]=""
_smith_flags["smith pr list"]="--state -s --author -A --label -l --base -B --head -H --limit -L --json --web -w --repo -R --jq -q --template -t"
_smith_subs["smith pr view"]=""
_smith_flags["smith pr view"]="--comments -c --json --web -w --repo -R --jq -q --template -t"
_smith_subs["smith pr diff"]=""
_smith_flags["smith pr diff"]="--patch --name-only --repo -R"
_smith_subs["smith pr create"]=""
_smith_flags["smith pr create"]="--title -t --body -b --body-file -F --base -B --head -H --draft -d --fill -f --label -l --assignee -a --milestone -m --reviewer -r --web -w --repo -R"
_smith_subs["smith pr checkout"]=""
_smith_flags["smith pr checkout"]="--branch -b --force -f --repo -R"
_smith_subs["smith pr merge"]=""
_smith_flags["smith pr merge"]="--merge -m --squash -s --rebase -r --rebase-merge --ff-only --delete-branch -d --auto --subject -t --body -b --body-file -F --admin --repo -R"
_smith_subs["smith pr close"]=""
_smith_flags["smith pr close"]="--comment -c --delete-branch -d --repo -R"
_smith_subs["smith pr reopen"]=""
_smith_flags["smith pr reopen"]="--comment -c --repo -R"
_smith_subs["smith pr comment"]=""
_smith_flags["smith pr comment"]="--body -b --body-file -F --repo -R"
_smith_subs["smith pr ready"]=""
_smith_flags["smith pr ready"]="--undo --repo -R"
_smith_subs["smith pr edit"]=""
_smith_flags["smith pr edit"]="--title -t --body -b --body-file -F --add-label --remove-label --add-assignee --remove-assignee --base -B --repo -R"
_smith_subs["smith pr review"]=""
_smith_flags["smith pr review"]="--approve -a --request-changes -r --comment -c --body -b --body-file -F --repo -R"
_smith_subs["smith pr update-branch"]=""
_smith_flags["smith pr update-branch"]="--rebase --repo -R"
_smith_subs["smith pr status"]=""
_smith_flags["smith pr status"]="--json --repo -R --jq -q --template -t"
_smith_subs["smith pr checks"]=""
_smith_flags["smith pr checks"]="--watch --interval -i --json --web -w --repo -R --jq -q --template -t"
_smith_subs["smith run"]="list view watch download cancel"
_smith_flags["smith run"]=""
_smith_subs["smith run list"]=""
_smith_flags["smith run list"]="--branch -b --status -s --event -e --workflow -w --commit -c --limit -L --json --web --repo -R --jq -q --template -t"
_smith_subs["smith run view"]=""
_smith_flags["smith run view"]="--log --log-failed --job -j --exit-status --json --web -w --repo -R --jq -q --template -t"
_smith_subs["smith run watch"]=""
_smith_flags["smith run watch"]="--interval -i --exit-status --repo -R"
_smith_subs["smith run download"]=""
_smith_flags["smith run download"]="--name -n --dir -D --repo -R"
_smith_subs["smith run cancel"]=""
_smith_flags["smith run cancel"]="--repo -R"
_smith_subs["smith release"]="list view create edit upload download delete delete-asset"
_smith_flags["smith release"]=""
_smith_subs["smith release list"]=""
_smith_flags["smith release list"]="--limit -L --json --repo -R --jq -q --template -t"
_smith_subs["smith release view"]=""
_smith_flags["smith release view"]="--web -w --json --repo -R --jq -q --template -t"
_smith_subs["smith release create"]=""
_smith_flags["smith release create"]="--title -t --notes -n --notes-file -F --target --draft -d --prerelease -p --repo -R"
_smith_subs["smith release edit"]=""
_smith_flags["smith release edit"]="--title -t --notes -n --notes-file -F --tag --draft --publish --prerelease --latest --repo -R"
_smith_subs["smith release upload"]=""
_smith_flags["smith release upload"]="--clobber --repo -R"
_smith_subs["smith release download"]=""
_smith_flags["smith release download"]="--pattern -p --dir -D --clobber --repo -R"
_smith_subs["smith release delete"]=""
_smith_flags["smith release delete"]="--cleanup-tag --yes -y --repo -R"
_smith_subs["smith release delete-asset"]=""
_smith_flags["smith release delete-asset"]="--yes -y --repo -R"
_smith_subs["smith label"]="list create edit delete clone"
_smith_flags["smith label"]=""
_smith_subs["smith label list"]=""
_smith_flags["smith label list"]="--json --repo -R --jq -q --template -t"
_smith_subs["smith label create"]=""
_smith_flags["smith label create"]="--color -c --description -d --exclusive --repo -R"
_smith_subs["smith label edit"]=""
_smith_flags["smith label edit"]="--name -n --color -c --description -d --repo -R"
_smith_subs["smith label delete"]=""
_smith_flags["smith label delete"]="--yes -y --repo -R"
_smith_subs["smith label clone"]=""
_smith_flags["smith label clone"]="--force -f --repo -R"
_smith_subs["smith milestone"]="list view create edit close reopen delete"
_smith_flags["smith milestone"]=""
_smith_subs["smith milestone list"]=""
_smith_flags["smith milestone list"]="--state -s --json --repo -R --jq -q --template -t"
_smith_subs["smith milestone view"]=""
_smith_flags["smith milestone view"]="--json --repo -R --jq -q --template -t"
_smith_subs["smith milestone create"]=""
_smith_flags["smith milestone create"]="--due --description -d --repo -R"
_smith_subs["smith milestone edit"]=""
_smith_flags["smith milestone edit"]="--title -t --due --description -d --repo -R"
_smith_subs["smith milestone close"]=""
_smith_flags["smith milestone close"]="--repo -R"
_smith_subs["smith milestone reopen"]=""
_smith_flags["smith milestone reopen"]="--repo -R"
_smith_subs["smith milestone delete"]=""
_smith_flags["smith milestone delete"]="--yes -y --repo -R"
_smith_subs["smith workflow"]="list run"
_smith_flags["smith workflow"]=""
_smith_subs["smith workflow list"]=""
_smith_flags["smith workflow list"]="--json --repo -R --jq -q --template -t"
_smith_subs["smith workflow run"]=""
_smith_flags["smith workflow run"]="--ref -r --field -F --raw-field -f --repo -R"
_smith_subs["smith secret"]="list set delete"
_smith_flags["smith secret"]=""
_smith_subs["smith secret list"]=""
_smith_flags["smith secret list"]="--org -o --user -u --repo -R --json --jq -q --template -t"
_smith_subs["smith secret set"]=""
_smith_flags["smith secret set"]="--org -o --user -u --repo -R --body -b"
_smith_subs["smith secret delete"]=""
_smith_flags["smith secret delete"]="--org -o --user -u --repo -R --yes -y"
_smith_subs["smith variable"]="list get set delete"
_smith_flags["smith variable"]=""
_smith_subs["smith variable list"]=""
_smith_flags["smith variable list"]="--org -o --user -u --repo -R --json --jq -q --template -t"
_smith_subs["smith variable get"]=""
_smith_flags["smith variable get"]="--org -o --user -u --repo -R"
_smith_subs["smith variable set"]=""
_smith_flags["smith variable set"]="--org -o --user -u --repo -R --body -b"
_smith_subs["smith variable delete"]=""
_smith_flags["smith variable delete"]="--org -o --user -u --repo -R --yes -y"
_smith_subs["smith search"]="repos issues prs"
_smith_flags["smith search"]=""
_smith_subs["smith search repos"]=""
_smith_flags["smith search repos"]="--owner --archived --limit -L --json --hostname --jq -q --template -t"
_smith_subs["smith search issues"]=""
_smith_flags["smith search issues"]="--state -s --owner --limit -L --json --hostname --jq -q --template -t"
_smith_subs["smith search prs"]=""
_smith_flags["smith search prs"]="--state -s --owner --limit -L --json --hostname --jq -q --template -t"
_smith_subs["smith status"]=""
_smith_flags["smith status"]="--hostname --limit -L --json --jq -q --template -t"
_smith_subs["smith notification"]="list read"
_smith_flags["smith notification"]=""
_smith_subs["smith notification list"]=""
_smith_flags["smith notification list"]="--all -a --limit -L --json --hostname --jq -q --template -t"
_smith_subs["smith notification read"]=""
_smith_flags["smith notification read"]="--all -a --hostname"
_smith_subs["smith ssh-key"]="list add delete"
_smith_flags["smith ssh-key"]=""
_smith_subs["smith ssh-key list"]=""
_smith_flags["smith ssh-key list"]="--json --hostname --jq -q --template -t"
_smith_subs["smith ssh-key add"]=""
_smith_flags["smith ssh-key add"]="--title -t --read-only --hostname"
_smith_subs["smith ssh-key delete"]=""
_smith_flags["smith ssh-key delete"]="--yes -y --hostname"
_smith_subs["smith gpg-key"]="list add delete"
_smith_flags["smith gpg-key"]=""
_smith_subs["smith gpg-key list"]=""
_smith_flags["smith gpg-key list"]="--json --hostname --jq -q --template -t"
_smith_subs["smith gpg-key add"]=""
_smith_flags["smith gpg-key add"]="--hostname"
_smith_subs["smith gpg-key delete"]=""
_smith_flags["smith gpg-key delete"]="--yes -y --hostname"
_smith_subs["smith org"]="list"
_smith_flags["smith org"]=""
_smith_subs["smith org list"]=""
_smith_flags["smith org list"]="--limit -L --json --hostname --jq -q --template -t"
_smith_subs["smith alias"]="set list delete import"
_smith_flags["smith alias"]=""
_smith_subs["smith alias set"]=""
_smith_flags["smith alias set"]="--shell -s --clobber"
_smith_subs["smith alias list"]=""
_smith_flags["smith alias list"]=""
_smith_subs["smith alias delete"]=""
_smith_flags["smith alias delete"]="--all"
_smith_subs["smith alias import"]=""
_smith_flags["smith alias import"]="--clobber"
_smith_subs["smith config"]="get set unset list"
_smith_flags["smith config"]=""
_smith_subs["smith config get"]=""
_smith_flags["smith config get"]="--host -h"
_smith_subs["smith config set"]=""
_smith_flags["smith config set"]="--host -h"
_smith_subs["smith config unset"]=""
_smith_flags["smith config unset"]=""
_smith_subs["smith config list"]=""
_smith_flags["smith config list"]="--host -h"
_smith_subs["smith api"]=""
_smith_flags["smith api"]="--method -X --raw-field -f --field -F --header -H --input --paginate --hostname --jq -q --template -t"
_smith_subs["smith browse"]=""
_smith_flags["smith browse"]="--branch -b --settings -s --actions -a --no-browser -n --repo -R"
_smith_subs["smith completion"]=""
_smith_flags["smith completion"]=""
_smith_subs["smith help"]=""
_smith_flags["smith help"]=""
_smith() {
    local cur=${COMP_WORDS[COMP_CWORD]} path=smith w i
    for ((i = 1; i < COMP_CWORD; i++)); do
        w=${COMP_WORDS[i]}
        [[ $w == -* ]] && continue
        [[ -n ${_smith_flags["$path $w"]+x} ]] || break
        path="$path $w"
    done
    if [[ $cur == -* ]]; then
        COMPREPLY=($(compgen -W "${_smith_flags[$path]} --help" -- "$cur"))
    else
        COMPREPLY=($(compgen -W "${_smith_subs[$path]}" -- "$cur"))
    fi
}
complete -o default -F _smith smith
