# fish completion for ggc
# Code generated by go run tools/cmd/gencompletions/main.go; DO NOT EDIT.

function __ggc_complete_branches
    ggc __complete branch 2>/dev/null
end

function __ggc_complete_files
    ggc __complete files 2>/dev/null
end

# Main commands
complete -c ggc -f -a "add branch clean commit config diff fetch help hook log pull push quit rebase remote restore stash status tag version"
complete -c ggc -f -n "__fish_seen_subcommand_from branch" -a "checkout contains create current delete info list move rename set sort"
complete -c ggc -f -n "__fish_seen_subcommand_from branch; and __fish_seen_subcommand_from delete" -a "merged"
complete -c ggc -f -n "__fish_seen_subcommand_from branch; and __fish_seen_subcommand_from list" -a "local remote verbose"
complete -c ggc -f -n "__fish_seen_subcommand_from branch; and __fish_seen_subcommand_from set" -a "upstream"
complete -c ggc -f -n "__fish_seen_subcommand_from clean" -a "dirs files interactive"
complete -c ggc -f -n "__fish_seen_subcommand_from commit" -a "allow amend"
complete -c ggc -f -n "__fish_seen_subcommand_from commit; and __fish_seen_subcommand_from allow" -a "empty"
complete -c ggc -f -n "__fish_seen_subcommand_from commit; and __fish_seen_subcommand_from amend" -a "no-edit"
complete -c ggc -f -n "__fish_seen_subcommand_from config" -a "get list set"
complete -c ggc -f -n "__fish_seen_subcommand_from diff" -a "head staged unstaged"
complete -c ggc -f -n "__fish_seen_subcommand_from fetch" -a "prune"
complete -c ggc -f -n "__fish_seen_subcommand_from hook" -a "disable edit enable install list uninstall"
complete -c ggc -f -n "__fish_seen_subcommand_from log" -a "graph simple"
complete -c ggc -f -n "__fish_seen_subcommand_from pull" -a "current rebase"
complete -c ggc -f -n "__fish_seen_subcommand_from push" -a "current force"
complete -c ggc -f -n "__fish_seen_subcommand_from rebase" -a "abort continue interactive skip"
complete -c ggc -f -n "__fish_seen_subcommand_from remote" -a "add list remove set-url"
complete -c ggc -f -n "__fish_seen_subcommand_from restore" -a "staged"
complete -c ggc -f -n "__fish_seen_subcommand_from stash" -a "apply branch clear create drop list pop push save show store"
complete -c ggc -f -n "__fish_seen_subcommand_from stash; and __fish_seen_subcommand_from push" -a "-m"
complete -c ggc -f -n "__fish_seen_subcommand_from status" -a "short"
complete -c ggc -f -n "__fish_seen_subcommand_from tag" -a "annotated create delete list push show"

# Branch checkout needs both keyword and dynamic branch names
complete -c ggc -f -n "__fish_seen_subcommand_from branch; and __fish_seen_subcommand_from checkout" -a "remote (__ggc_complete_branches)"

# Rebase branch completion when not using a subcommand
complete -c ggc -f -n "__fish_seen_subcommand_from rebase; and not __fish_seen_subcommand_from interactive; and not __fish_seen_subcommand_from continue; and not __fish_seen_subcommand_from abort; and not __fish_seen_subcommand_from skip" -a "(__ggc_complete_branches)"

# Add subcommands also allow file completion
complete -c ggc -f -n "__fish_seen_subcommand_from add" -a "interactive patch"
complete -c ggc -f -n "__fish_seen_subcommand_from add" -a "(__ggc_complete_files)"
