#compdef git-subrepo -P git\ ##subrepo #description perform git-subrepo operations # DO NOT EDIT. This file generated by pkg/bin/generate-completion.pl. if [[ -z $GIT_SUBREPO_ROOT ]]; then echo 'GIT_SUBREPO_ROOT is null; has `/path/to/git-subrepo/.rc` been sourced?' return 3 fi _git-subrepo() { typeset -A opt_args local curcontext="$curcontext" state line context _arguments -s \ '1: :->subcmd' \ '*: :->args' \ '-h[Show the command summary]' \ '--help[Help overview]' \ '--version[Print the git-subrepo version number]' \ '(-a --all)'{-a,--all}'[Perform command on all current subrepos]' \ '(-A --ALL)'{-A,--ALL}'[Perform command on all subrepos and subsubrepos]' \ '(-b --branch)'{-b,--branch}'[Specify the upstream branch to push/pull/fetch]:b' \ '(-e --edit)'{-e,--edit}'[Edit commit message]' \ '(-f --force)'{-f,--force}'[Force certain operations]' \ '(-F --fetch)'{-F,--fetch}'[Fetch the upstream content first]' \ '(-M --method)'{-M,--method}'[Method when you join, valid options are '"'"'merge'"'"' or '"'"'rebase'"'"']:M' \ '--Default[is '"'"'merge'"'"']' \ '(-m --message)'{-m,--message}'[Specify a commit message]:m' \ '(-N --dry-run)'{-N,--dry-run}'[Don'"'"'t push or commit (prints next commands to run)]' \ '(-r --remote)'{-r,--remote}'[Specify the upstream remote to push/pull/fetch]:r' \ '(-s --squash)'{-s,--squash}'[Squash commits on push]' \ '(-u --update)'{-u,--update}'[Add the --branch and/or --remote overrides to .gitrepo]' \ '(-q --quiet)'{-q,--quiet}'[Show minimal output]' \ '(-v --verbose)'{-v,--verbose}'[Show verbose output]' \ '(-d --debug)'{-d,--debug}'[Show the actual commands used]' \ '(-x --DEBUG)'{-x,--DEBUG}'[Turn on -x Bash debugging]' \ && ret=0 case $state in subcmd) compadd branch clean clone clone clone commit commit commit config fetch fetch fetch help help help init pull pull pull push push push status status status upgrade version ;; args) case $line[1] in clone) _arguments -C \ '1: :->subcmd' \ '2: :->repo' \ '*: :->subdir' \ && ret=0 case $state in subdir|repo) _files ;; esac ;; branch|clean|commit|commit|commit|config|fetch|fetch|fetch|pull|pull|pull|push|push|push|status|status|status) _compadd_subdirs ;; init) _files ;; help) compadd branch clean clone clone clone commit commit commit config fetch fetch fetch help help help init pull pull pull push push push status status status upgrade version ;; esac ;; esac } _compadd_subdirs() { local subrepos IFS=$'\n' set -A subrepos `git subrepo status -q` compadd -X "subrepos: " $subrepos }