#compdef pijul

autoload -U is-at-least

_pijul() {
    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[@]}" : \
'*--config=[Override a configuration value, in the form \`--config key=value\`]:CONFIG:_default' \
'-h[Print help]' \
'--help[Print help]' \
'-V[Print version]' \
'--version[Print version]' \
":: :_pijul_commands" \
"*::: :->pijul" \
&& ret=0
    case $state in
    (pijul)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:pijul-command-$line[1]:"
        case $line[1] in
            (init)
_arguments "${_arguments_options[@]}" : \
'--channel=[Set the name of the current channel (defaults to "main")]:CHANNEL:_default' \
'-k+[Project kind; if Pijul knows about your project kind, the .ignore file will be populated with a conservative list of commonly ignored entries. Example\: \`pijul init --kind=rust\`]:KIND:_default' \
'--kind=[Project kind; if Pijul knows about your project kind, the .ignore file will be populated with a conservative list of commonly ignored entries. Example\: \`pijul init --kind=rust\`]:KIND:_default' \
'*--config=[Override a configuration value, in the form \`--config key=value\`]:CONFIG:_default' \
'-h[Print help]' \
'--help[Print help]' \
'::path -- Path where the repository should be initalized:_files -/' \
&& ret=0
;;
(clone)
_arguments "${_arguments_options[@]}" : \
'--channel=[Set the remote channel]:CHANNEL:_default' \
'(--state)--change=[Clone this change and its dependencies]:CHANGE:_default' \
'(--change)--state=[Clone this state]:STATE:_default' \
'*--path=[Clone this path only]:PARTIAL_PATHS:_default' \
'*--config=[Override a configuration value, in the form \`--config key=value\`]:CONFIG:_default' \
'-k[Do not check certificates (HTTPS remotes only, this option might be dangerous)]' \
'-h[Print help]' \
'--help[Print help]' \
':remote -- Clone this remote:_default' \
'::path -- Path where to clone the repository. If missing, the inferred name of the remote repository is used:_files -/' \
'::salt:_default' \
&& ret=0
;;
(record)
_arguments "${_arguments_options[@]}" : \
'--repository=[Work with the repository at PATH instead of the one containing the current directory]:PATH:_files -/' \
'--channel=[Work with CHANNEL instead of the current channel]:CHANNEL:_default' \
'-m+[Set the change message]:MESSAGE:_default' \
'--message=[Set the change message]:MESSAGE:_default' \
'--description=[Set the description field]:DESCRIPTION:_default' \
'--author=[Set the author field]:AUTHOR:_default' \
'--timestamp=[Set the timestamp field]:TIMESTAMP:_default' \
'--amend=[Amend this change instead of creating a new change]::AMEND:_default' \
'--identity=[Identity to sign changes with]:IDENTITY:_default' \
'--algorithm=[Diff algorithm to use (default\: myers)]:ALGORITHM:(patience histogram)' \
'*--config=[Override a configuration value, in the form \`--config key=value\`]:CONFIG:_default' \
'-a[Record all paths that have changed]' \
'--all[Record all paths that have changed]' \
'-h[Print help]' \
'--help[Print help]' \
'*::prefixes -- Paths in which to record the changes:_files' \
&& ret=0
;;
(diff)
_arguments "${_arguments_options[@]}" : \
'--repository=[Work with the repository at PATH instead of the one containing the current directory]:PATH:_files -/' \
'--channel=[Work with CHANNEL instead of the current channel]:CHANNEL:_default' \
'--output-format=[Output format. \`json\` emits a structured diff instead of the default human-readable change text]:OUTPUT_FORMAT:(plaintext json)' \
'--algorithm=[Diff algorithm to use (default\: myers)]:ALGORITHM:(patience histogram)' \
'*--config=[Override a configuration value, in the form \`--config key=value\`]:CONFIG:_default' \
'--json[Deprecated alias for \`--output-format json\`]' \
'--context[Show the uncommitted change inlined in the full context of each file (a structured JSON "palimpsest"\: added / removed spans over the whole file). This is the record-time preview; intended for editor clients]' \
'-s[Show a short version of the diff]' \
'--short[Show a short version of the diff]' \
'-u[Include the untracked files]' \
'--untracked[Include the untracked files]' \
'-h[Print help]' \
'--help[Print help]' \
'*::prefixes -- Only diff those paths (files or directories). If missing, diff the entire repository:_files' \
&& ret=0
;;
(status)
_arguments "${_arguments_options[@]}" : \
'--repository=[Work with the repository at PATH instead of the one containing the current directory]:PATH:_files -/' \
'--channel=[Work with CHANNEL instead of the current channel]:CHANNEL:_default' \
'--output-format=[Output format. \`json\` emits a structured status instead of the default human-readable summary]:OUTPUT_FORMAT:(plaintext json)' \
'*--config=[Override a configuration value, in the form \`--config key=value\`]:CONFIG:_default' \
'-h[Print help]' \
'--help[Print help]' \
'*::prefixes -- Only show status for these paths:_files' \
&& ret=0
;;
(log)
_arguments "${_arguments_options[@]}" : \
'--repository=[Work with the repository at PATH instead of the one containing the current directory]:PATH:_files -/' \
'--channel=[Work with CHANNEL instead of the current channel]:CHANNEL:_default' \
'--offset=[Start after this many changes]:OFFSET:_default' \
'--limit=[Output at most this many changes]:LIMIT:_default' \
'--output-format=[]:OUTPUT_FORMAT:(plaintext json)' \
'*--config=[Override a configuration value, in the form \`--config key=value\`]:CONFIG:_default' \
'(--files)--hash-only[Only show the change hashes]' \
'--state[Include state identifiers in the output]' \
'--description[Include full change description in the output]' \
'--files[Include files changed in the output]' \
'-h[Print help]' \
'--help[Print help]' \
'*::filters -- Filter log output, showing only log entries that touched the specified files. Accepted as a list of paths relative to your current directory. Currently, filters can only be applied when logging the channel that'\''s in use:_default' \
&& ret=0
;;
(push)
_arguments "${_arguments_options[@]}" : \
'--repository=[Work with the repository at PATH instead of the one containing the current directory]:PATH:_files -/' \
'--from-channel=[Push from this channel instead of the default channel]:FROM_CHANNEL:_default' \
'*--path=[Push changes only relating to these paths]:PATH:_files' \
'--to-channel=[Push to this remote channel instead of the remote'\''s default channel]:TO_CHANNEL:_default' \
'*--config=[Override a configuration value, in the form \`--config key=value\`]:CONFIG:_default' \
'()-a[Push all changes]' \
'()--all[Push all changes]' \
'-k[Do not check certificates (HTTPS remotes only, this option might be dangerous)]' \
'-h[Print help]' \
'--help[Print help]' \
'::to -- Push to this remote:_default' \
'*::changes -- Push only these changes:_default' \
&& ret=0
;;
(pull)
_arguments "${_arguments_options[@]}" : \
'--repository=[Work with the repository at PATH instead of the one containing the current directory]:PATH:_files -/' \
'--to-channel=[Pull into this channel instead of the current channel]:TO_CHANNEL:_default' \
'*--path=[Only pull to these paths]:PATH:_files' \
'--from-channel=[Pull from this remote channel]:FROM_CHANNEL:_default' \
'*--config=[Override a configuration value, in the form \`--config key=value\`]:CONFIG:_default' \
'()-a[Pull all changes]' \
'()--all[Pull all changes]' \
'-k[Do not check certificates (HTTPS remotes only, this option might be dangerous)]' \
'--complete[Download complete changes, including file contents (needed if you lose network access later)]' \
'-h[Print help]' \
'--help[Print help]' \
'::from -- Pull from this remote:_default' \
'*::changes -- Pull changes from the local repository, not necessarily from a channel:_default' \
&& ret=0
;;
(change)
_arguments "${_arguments_options[@]}" : \
'--repository=[Work with the repository at PATH instead of the one containing the current directory]:PATH:_files -/' \
'*--config=[Override a configuration value, in the form \`--config key=value\`]:CONFIG:_default' \
'--context[Instead of the raw patch, show the change inlined in the full context of each file it touches, as a structured JSON "palimpsest" (added / removed / added-then-removed spans). Intended for editor integrations]' \
'-h[Print help]' \
'--help[Print help]' \
'::hash -- The hash of the change to show, or an unambiguous prefix thereof:_default' \
&& ret=0
;;
(http-token)
_arguments "${_arguments_options[@]}" : \
'--identity=[Identity to sign with (defaults to the configured identity)]:IDENTITY:_default' \
'*--config=[Override a configuration value, in the form \`--config key=value\`]:CONFIG:_default' \
'-h[Print help]' \
'--help[Print help]' \
'::remote -- The HTTP remote (URL or configured name). Defaults to the default remote:_default' \
&& ret=0
;;
(dependents)
_arguments "${_arguments_options[@]}" : \
'--repository=[Work with the repository at PATH instead of the one containing the current directory]:PATH:_files -/' \
'*--config=[Override a configuration value, in the form \`--config key=value\`]:CONFIG:_default' \
'-h[Print help]' \
'--help[Print help]' \
'::hash -- The hash of the change to show, or an unambiguous prefix thereof:_default' \
&& ret=0
;;
(channel)
_arguments "${_arguments_options[@]}" : \
'--repository=[Work with the repository at PATH instead of the one containing the current directory]:PATH:_files -/' \
'*--config=[Override a configuration value, in the form \`--config key=value\`]:CONFIG:_default' \
'-h[Print help]' \
'--help[Print help]' \
":: :_pijul__subcmd__channel_commands" \
"*::: :->channel" \
&& ret=0

    case $state in
    (channel)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:pijul-channel-command-$line[1]:"
        case $line[1] in
            (delete)
_arguments "${_arguments_options[@]}" : \
'*--config=[Override a configuration value, in the form \`--config key=value\`]:CONFIG:_default' \
'-h[Print help]' \
'--help[Print help]' \
':delete:_default' \
&& ret=0
;;
(rename)
_arguments "${_arguments_options[@]}" : \
'*--config=[Override a configuration value, in the form \`--config key=value\`]:CONFIG:_default' \
'-h[Print help]' \
'--help[Print help]' \
'::from -- Name of the channel to be renamed. Defaults to current channel:_default' \
':to -- New name of the channel to rename to:_default' \
&& ret=0
;;
(switch)
_arguments "${_arguments_options[@]}" : \
'*--config=[Override a configuration value, in the form \`--config key=value\`]:CONFIG:_default' \
'-h[Print help]' \
'--help[Print help]' \
'::to -- Name of the channel to switch to. If not specified, defaults to current channel:_default' \
&& ret=0
;;
(new)
_arguments "${_arguments_options[@]}" : \
'*--config=[Override a configuration value, in the form \`--config key=value\`]:CONFIG:_default' \
'--empty[]' \
'-h[Print help]' \
'--help[Print help]' \
':name:_default' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_pijul__subcmd__channel__subcmd__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:pijul-channel-help-command-$line[1]:"
        case $line[1] in
            (delete)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(rename)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(switch)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(new)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
;;
(protocol)
_arguments "${_arguments_options[@]}" : \
'--repository=[Work with the repository at PATH instead of the one containing the current directory]:PATH:_files -/' \
'--version=[Use this protocol version]:VERSION:_default' \
'*--config=[Override a configuration value, in the form \`--config key=value\`]:CONFIG:_default' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(git)
_arguments "${_arguments_options[@]}" : \
'--stats=[Time the import, and output values to this file]:STATS:_files' \
'*--config=[Override a configuration value, in the form \`--config key=value\`]:CONFIG:_default' \
'-h[Print help]' \
'--help[Print help]' \
'::git_path -- Process this path instead of the current directory, creating a Pijul repository if necessary:_files -/' \
'::pijul_path -- Process this path instead of the current directory, creating a Pijul repository if necessary:_files -/' \
'::check -- Check only the first n commits processed:_default' \
&& ret=0
;;
(move)
_arguments "${_arguments_options[@]}" : \
'--repository=[Work with the repository at PATH instead of the one containing the current directory]:PATH:_files -/' \
'--salt=[]:SALT:_default' \
'*--config=[Override a configuration value, in the form \`--config key=value\`]:CONFIG:_default' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'*::paths -- Paths which need to be moved:_files' \
&& ret=0
;;
(list)
_arguments "${_arguments_options[@]}" : \
'--repository=[Work with the repository at PATH instead of the one containing the current directory]:PATH:_files -/' \
'*--config=[Override a configuration value, in the form \`--config key=value\`]:CONFIG:_default' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(add)
_arguments "${_arguments_options[@]}" : \
'--repository=[Work with the repository at PATH instead of the one containing the current directory]:PATH:_files -/' \
'--salt=[]:SALT:_default' \
'*--config=[Override a configuration value, in the form \`--config key=value\`]:CONFIG:_default' \
'-r[]' \
'--recursive[]' \
'-f[]' \
'--force[]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'*::paths -- Paths to add to the internal tree:_files' \
&& ret=0
;;
(remove)
_arguments "${_arguments_options[@]}" : \
'--repository=[Work with the repository at PATH instead of the one containing the current directory]:PATH:_files -/' \
'*--config=[Override a configuration value, in the form \`--config key=value\`]:CONFIG:_default' \
'-h[Print help]' \
'--help[Print help]' \
'*::paths -- The paths to remove:_files' \
&& ret=0
;;
(reset)
_arguments "${_arguments_options[@]}" : \
'--repository=[Work with the repository at PATH instead of the one containing the current directory]:PATH:_files -/' \
'--channel=[Reset the working copy to this channel, and change the current channel to this channel]:CHANNEL:_default' \
'*--config=[Override a configuration value, in the form \`--config key=value\`]:CONFIG:_default' \
'--dry-run[Print this file to the standard output, without modifying the repository (works for a single file only)]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'*::files -- Only reset these files:_files' \
&& ret=0
;;
(debug)
_arguments "${_arguments_options[@]}" : \
'--repository=[Work with the repository at PATH instead of the one containing the current directory]:PATH:_files -/' \
'--channel=[Work with CHANNEL instead of the current channel]:CHANNEL:_default' \
'*--config=[Override a configuration value, in the form \`--config key=value\`]:CONFIG:_default' \
'--sanakirja-only[]' \
'-h[Print help]' \
'--help[Print help]' \
'::root:_default' \
&& ret=0
;;
(replay)
_arguments "${_arguments_options[@]}" : \
'--repository=[Work with the repository at PATH instead of the one containing the current directory]:PATH:_files -/' \
'--log=[The replay log to execute. Defaults to \`.pijul/replay.log\` in the repository]:PATH:_files' \
'-n+[Only execute the first N operations of the log (useful for bisecting)]:N:_default' \
'--count=[Only execute the first N operations of the log (useful for bisecting)]:N:_default' \
'*--config=[Override a configuration value, in the form \`--config key=value\`]:CONFIG:_default' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(fork)
_arguments "${_arguments_options[@]}" : \
'--repository=[Work with the repository at PATH instead of the one containing the current directory]:PATH:_files -/' \
'(--change --channel)--state=[Make the new channel from this state instead of the current channel]:STATE:_default' \
'(--change --state)--channel=[Make the new channel from this channel instead of the current channel]:CHANNEL:_default' \
'(--channel --state)--change=[Apply this change after creating the channel]:CHANGE:_default' \
'*--config=[Override a configuration value, in the form \`--config key=value\`]:CONFIG:_default' \
'-h[Print help]' \
'--help[Print help]' \
':to -- The name of the new channel:_default' \
&& ret=0
;;
(unrecord)
_arguments "${_arguments_options[@]}" : \
'--repository=[Work with the repository at PATH instead of the one containing the current directory]:PATH:_files -/' \
'--channel=[Unrecord changes from this channel instead of the current channel]:CHANNEL:_default' \
'()--show-changes=[Show N changes in a text editor if no <change-id>s were given. Defaults to the value of \`unrecord_changes\` in your global configuration]:N:_default' \
'*--config=[Override a configuration value, in the form \`--config key=value\`]:CONFIG:_default' \
'--reset[Also undo the changes in the working copy (preserving unrecorded changes if there are any)]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'*::change_id -- The hash of a change (unambiguous prefixes are accepted):_default' \
&& ret=0
;;
(apply)
_arguments "${_arguments_options[@]}" : \
'--repository=[Work with the repository at PATH instead of the one containing the current directory]:PATH:_files -/' \
'--channel=[Work with CHANNEL instead of the current channel]:CHANNEL:_default' \
'*--config=[Override a configuration value, in the form \`--config key=value\`]:CONFIG:_default' \
'--deps-only[Only apply the dependencies of the change, not the change itself. Only applicable for a single change]' \
'-h[Print help]' \
'--help[Print help]' \
'*::change -- The change that need to be applied. If this value is missing, read the change in text format on the standard input:_default' \
&& ret=0
;;
(remote)
_arguments "${_arguments_options[@]}" : \
'--repository=[Work with the repository at PATH instead of the one containing the current directory]:PATH:_files -/' \
'*--config=[Override a configuration value, in the form \`--config key=value\`]:CONFIG:_default' \
'-h[Print help]' \
'--help[Print help]' \
":: :_pijul__subcmd__remote_commands" \
"*::: :->remote" \
&& ret=0

    case $state in
    (remote)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:pijul-remote-command-$line[1]:"
        case $line[1] in
            (default)
_arguments "${_arguments_options[@]}" : \
'*--config=[Override a configuration value, in the form \`--config key=value\`]:CONFIG:_default' \
'-h[Print help]' \
'--help[Print help]' \
':remote:_default' \
&& ret=0
;;
(delete)
_arguments "${_arguments_options[@]}" : \
'*--config=[Override a configuration value, in the form \`--config key=value\`]:CONFIG:_default' \
'-1[Delete only the specified datum, i.e. database ID or remote name. If this isn'\''t specified and there is at most one of each kind of data linked to a remote, the entire remote is deleted]' \
'--exact[Delete only the specified datum, i.e. database ID or remote name. If this isn'\''t specified and there is at most one of each kind of data linked to a remote, the entire remote is deleted]' \
'--flood[Delete all the linked data of the remote, i.e. all names and all database IDs]' \
'-h[Print help]' \
'--help[Print help]' \
':remote:_default' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_pijul__subcmd__remote__subcmd__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:pijul-remote-help-command-$line[1]:"
        case $line[1] in
            (default)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(delete)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
;;
(archive)
_arguments "${_arguments_options[@]}" : \
'--repository=[Work with the repository at PATH instead of the one containing the current directory]:PATH:_files -/' \
'--channel=[Work with CHANNEL instead of the current channel]:CHANNEL:_default' \
'--remote=[Ask the remote to send an archive]:REMOTE:_default' \
'--state=[Archive in this state]:STATE:_default' \
'*--change=[Apply these changes after switching to the channel]:CHANGE:_default' \
'--prefix=[Append this path in front of each path inside the archive]:PREFIX:_default' \
'--umask=[Append this path in front of each path inside the archive]:UMASK:_default' \
'-o+[Name of the output file]:NAME:_files' \
'*--config=[Override a configuration value, in the form \`--config key=value\`]:CONFIG:_default' \
'-k[Do not check certificates (HTTPS remotes only, this option might be dangerous)]' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(credit)
_arguments "${_arguments_options[@]}" : \
'--repository=[Work with the repository at PATH instead of the one containing the current directory]:PATH:_files -/' \
'--channel=[Work with CHANNEL instead of the current channel]:CHANNEL:_default' \
'--output-format=[Output the annotations as structured JSON instead of the default human-readable, per-line change attribution]:OUTPUT_FORMAT:(plaintext json)' \
'*--config=[Override a configuration value, in the form \`--config key=value\`]:CONFIG:_default' \
'-h[Print help]' \
'--help[Print help]' \
':file -- The file to annotate:_files' \
&& ret=0
;;
(identity)
_arguments "${_arguments_options[@]}" : \
'--repository=[Work with the repository at PATH instead of the one containing the current directory]:PATH:_files -/' \
'*--config=[Override a configuration value, in the form \`--config key=value\`]:CONFIG:_default' \
'-k[Do not verify certificates (use with caution)]' \
'--no-cert-check[Do not verify certificates (use with caution)]' \
'-h[Print help]' \
'--help[Print help]' \
":: :_pijul__subcmd__identity_commands" \
"*::: :->identity" \
&& ret=0

    case $state in
    (identity)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:pijul-identity-command-$line[1]:"
        case $line[1] in
            (new)
_arguments "${_arguments_options[@]}" : \
'--username=[Set the username]:USERNAME:_users' \
'--remote=[Set the default remote]:REMOTE:_default' \
'--display-name=[Set the display name]:DISPLAY_NAME:_default' \
'--email=[Set the email]:EMAIL:_default' \
'--expiry=[Set the expiry]:EXPIRY:_default' \
'*--config=[Override a configuration value, in the form \`--config key=value\`]:CONFIG:_default' \
'--no-link[Do not automatically link keys with the remote]' \
'-h[Print help]' \
'--help[Print help]' \
'::name -- Set the new identity name:_default' \
&& ret=0
;;
(repair)
_arguments "${_arguments_options[@]}" : \
'*--config=[Override a configuration value, in the form \`--config key=value\`]:CONFIG:_default' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(prove)
_arguments "${_arguments_options[@]}" : \
'--name=[Set the name used to prove the identity]:IDENTITY_NAME:_default' \
'*--config=[Override a configuration value, in the form \`--config key=value\`]:CONFIG:_default' \
'-h[Print help]' \
'--help[Print help]' \
'::server -- Set the target server:_default' \
&& ret=0
;;
(list)
_arguments "${_arguments_options[@]}" : \
'*--config=[Override a configuration value, in the form \`--config key=value\`]:CONFIG:_default' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(edit)
_arguments "${_arguments_options[@]}" : \
'--username=[Set the username]:USERNAME:_users' \
'--remote=[Set the default remote]:REMOTE:_default' \
'--display-name=[Set the display name]:DISPLAY_NAME:_default' \
'--email=[Set the email]:EMAIL:_default' \
'--new-name=[Set the identity name]:NEW_NAME:_default' \
'--expiry=[Set the expiry]:EXPIRY:_default' \
'*--config=[Override a configuration value, in the form \`--config key=value\`]:CONFIG:_default' \
'--no-link[Do not automatically link keys with the remote]' \
'-h[Print help]' \
'--help[Print help]' \
'::old_name -- Set the name of the identity to edit:_default' \
&& ret=0
;;
(remove)
_arguments "${_arguments_options[@]}" : \
'--name=[Set the name of the identity to remove]:IDENTITY_NAME:_default' \
'*--config=[Override a configuration value, in the form \`--config key=value\`]:CONFIG:_default' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_pijul__subcmd__identity__subcmd__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:pijul-identity-help-command-$line[1]:"
        case $line[1] in
            (new)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(repair)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(prove)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(list)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(edit)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(remove)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
;;
(client)
_arguments "${_arguments_options[@]}" : \
'*--config=[Override a configuration value, in the form \`--config key=value\`]:CONFIG:_default' \
'-h[Print help]' \
'--help[Print help]' \
':url -- Url to authenticate to:_urls' \
&& ret=0
;;
(completion)
_arguments "${_arguments_options[@]}" : \
'*--config=[Override a configuration value, in the form \`--config key=value\`]:CONFIG:_default' \
'-h[Print help]' \
'--help[Print help]' \
":: :_pijul__subcmd__completion_commands" \
"*::: :->completion" \
&& ret=0

    case $state in
    (completion)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:pijul-completion-command-$line[1]:"
        case $line[1] in
            (bash)
_arguments "${_arguments_options[@]}" : \
'*--config=[Override a configuration value, in the form \`--config key=value\`]:CONFIG:_default' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(elvish)
_arguments "${_arguments_options[@]}" : \
'*--config=[Override a configuration value, in the form \`--config key=value\`]:CONFIG:_default' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(fish)
_arguments "${_arguments_options[@]}" : \
'*--config=[Override a configuration value, in the form \`--config key=value\`]:CONFIG:_default' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(power-shell)
_arguments "${_arguments_options[@]}" : \
'*--config=[Override a configuration value, in the form \`--config key=value\`]:CONFIG:_default' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(zsh)
_arguments "${_arguments_options[@]}" : \
'*--config=[Override a configuration value, in the form \`--config key=value\`]:CONFIG:_default' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_pijul__subcmd__completion__subcmd__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:pijul-completion-help-command-$line[1]:"
        case $line[1] in
            (bash)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(elvish)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(fish)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(power-shell)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(zsh)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
;;
(docgen)
_arguments "${_arguments_options[@]}" : \
'*--config=[Override a configuration value, in the form \`--config key=value\`]:CONFIG:_default' \
'-h[Print help]' \
'--help[Print help]' \
":: :_pijul__subcmd__docgen_commands" \
"*::: :->docgen" \
&& ret=0

    case $state in
    (docgen)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:pijul-docgen-command-$line[1]:"
        case $line[1] in
            (man)
_arguments "${_arguments_options[@]}" : \
'*--config=[Override a configuration value, in the form \`--config key=value\`]:CONFIG:_default' \
'-h[Print help]' \
'--help[Print help]' \
':outdir -- Directory to write .1 files into:_files' \
&& ret=0
;;
(markdown)
_arguments "${_arguments_options[@]}" : \
'*--config=[Override a configuration value, in the form \`--config key=value\`]:CONFIG:_default' \
'-h[Print help]' \
'--help[Print help]' \
':outdir -- Directory to write .md files into:_files' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_pijul__subcmd__docgen__subcmd__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:pijul-docgen-help-command-$line[1]:"
        case $line[1] in
            (man)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(markdown)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_pijul__subcmd__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:pijul-help-command-$line[1]:"
        case $line[1] in
            (init)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(clone)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(record)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(diff)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(status)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(log)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(push)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(pull)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(change)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(http-token)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(dependents)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(channel)
_arguments "${_arguments_options[@]}" : \
":: :_pijul__subcmd__help__subcmd__channel_commands" \
"*::: :->channel" \
&& ret=0

    case $state in
    (channel)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:pijul-help-channel-command-$line[1]:"
        case $line[1] in
            (delete)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(rename)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(switch)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(new)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
(protocol)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(git)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(move)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(list)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(add)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(remove)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(reset)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(debug)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(replay)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(fork)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(unrecord)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(apply)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(remote)
_arguments "${_arguments_options[@]}" : \
":: :_pijul__subcmd__help__subcmd__remote_commands" \
"*::: :->remote" \
&& ret=0

    case $state in
    (remote)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:pijul-help-remote-command-$line[1]:"
        case $line[1] in
            (default)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(delete)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
(archive)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(credit)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(identity)
_arguments "${_arguments_options[@]}" : \
":: :_pijul__subcmd__help__subcmd__identity_commands" \
"*::: :->identity" \
&& ret=0

    case $state in
    (identity)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:pijul-help-identity-command-$line[1]:"
        case $line[1] in
            (new)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(repair)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(prove)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(list)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(edit)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(remove)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
(client)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(completion)
_arguments "${_arguments_options[@]}" : \
":: :_pijul__subcmd__help__subcmd__completion_commands" \
"*::: :->completion" \
&& ret=0

    case $state in
    (completion)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:pijul-help-completion-command-$line[1]:"
        case $line[1] in
            (bash)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(elvish)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(fish)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(power-shell)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(zsh)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
(docgen)
_arguments "${_arguments_options[@]}" : \
":: :_pijul__subcmd__help__subcmd__docgen_commands" \
"*::: :->docgen" \
&& ret=0

    case $state in
    (docgen)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:pijul-help-docgen-command-$line[1]:"
        case $line[1] in
            (man)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(markdown)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
}

(( $+functions[_pijul_commands] )) ||
_pijul_commands() {
    local commands; commands=(
'init:Initializes an empty pijul repository' \
'clone:Clones an existing pijul repository' \
'record:Creates a new change' \
'diff:Shows difference between two channels/changes' \
'status:Shows a brief overview of changes' \
'log:Show the entire log of changes' \
'push:Pushes changes to a remote upstream' \
'pull:Pulls changes from a remote upstream' \
'change:Shows information about a particular change' \
'http-token:Mints an HTTP bearer token for a Nest using your SSH key' \
'dependents:Lists the transitive closure of the reverse dependency relation' \
'channel:Manages different channels' \
'protocol:This command is not meant to be run by the user, instead it is called over SSH' \
'git:Imports a git repository into pijul' \
'move:Moves a file in the working copy and the tree' \
'list:Lists files tracked by pijul' \
'add:Adds a path to the tree' \
'remove:Removes a file from the tree of tracked files (\`pijul record\` will then record this as a deletion)' \
'reset:Resets the working copy to the last recorded change' \
'debug:' \
'replay:Replays a recorded \`.pijul/replay.log\` against a repository (debugging)' \
'fork:Create a new channel' \
'unrecord:Unrecords a list of changes' \
'apply:Applies changes to a channel' \
'remote:Manages remote repositories' \
'archive:Creates an archive of the repository' \
'credit:Shows which change last affected each line of the given file(s)' \
'identity:A collection of tools for interactively managing the user'\''s identities. This may be useful if you use Pijul in multiple contexts, for example both work & personal projects' \
'client:Authenticates with a HTTP server' \
'completion:Shell completion script generation' \
'docgen:Generate man pages or markdown documentation' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'pijul commands' commands "$@"
}
(( $+functions[_pijul__subcmd__add_commands] )) ||
_pijul__subcmd__add_commands() {
    local commands; commands=()
    _describe -t commands 'pijul add commands' commands "$@"
}
(( $+functions[_pijul__subcmd__apply_commands] )) ||
_pijul__subcmd__apply_commands() {
    local commands; commands=()
    _describe -t commands 'pijul apply commands' commands "$@"
}
(( $+functions[_pijul__subcmd__archive_commands] )) ||
_pijul__subcmd__archive_commands() {
    local commands; commands=()
    _describe -t commands 'pijul archive commands' commands "$@"
}
(( $+functions[_pijul__subcmd__change_commands] )) ||
_pijul__subcmd__change_commands() {
    local commands; commands=()
    _describe -t commands 'pijul change commands' commands "$@"
}
(( $+functions[_pijul__subcmd__channel_commands] )) ||
_pijul__subcmd__channel_commands() {
    local commands; commands=(
'delete:Delete a channel. The channel must not be the current channel' \
'rename:Rename a channel' \
'switch:Switch to a channel. There must not be unrecorded changes in the working copy' \
'new:Create a new, empty channel' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'pijul channel commands' commands "$@"
}
(( $+functions[_pijul__subcmd__channel__subcmd__delete_commands] )) ||
_pijul__subcmd__channel__subcmd__delete_commands() {
    local commands; commands=()
    _describe -t commands 'pijul channel delete commands' commands "$@"
}
(( $+functions[_pijul__subcmd__channel__subcmd__help_commands] )) ||
_pijul__subcmd__channel__subcmd__help_commands() {
    local commands; commands=(
'delete:Delete a channel. The channel must not be the current channel' \
'rename:Rename a channel' \
'switch:Switch to a channel. There must not be unrecorded changes in the working copy' \
'new:Create a new, empty channel' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'pijul channel help commands' commands "$@"
}
(( $+functions[_pijul__subcmd__channel__subcmd__help__subcmd__delete_commands] )) ||
_pijul__subcmd__channel__subcmd__help__subcmd__delete_commands() {
    local commands; commands=()
    _describe -t commands 'pijul channel help delete commands' commands "$@"
}
(( $+functions[_pijul__subcmd__channel__subcmd__help__subcmd__help_commands] )) ||
_pijul__subcmd__channel__subcmd__help__subcmd__help_commands() {
    local commands; commands=()
    _describe -t commands 'pijul channel help help commands' commands "$@"
}
(( $+functions[_pijul__subcmd__channel__subcmd__help__subcmd__new_commands] )) ||
_pijul__subcmd__channel__subcmd__help__subcmd__new_commands() {
    local commands; commands=()
    _describe -t commands 'pijul channel help new commands' commands "$@"
}
(( $+functions[_pijul__subcmd__channel__subcmd__help__subcmd__rename_commands] )) ||
_pijul__subcmd__channel__subcmd__help__subcmd__rename_commands() {
    local commands; commands=()
    _describe -t commands 'pijul channel help rename commands' commands "$@"
}
(( $+functions[_pijul__subcmd__channel__subcmd__help__subcmd__switch_commands] )) ||
_pijul__subcmd__channel__subcmd__help__subcmd__switch_commands() {
    local commands; commands=()
    _describe -t commands 'pijul channel help switch commands' commands "$@"
}
(( $+functions[_pijul__subcmd__channel__subcmd__new_commands] )) ||
_pijul__subcmd__channel__subcmd__new_commands() {
    local commands; commands=()
    _describe -t commands 'pijul channel new commands' commands "$@"
}
(( $+functions[_pijul__subcmd__channel__subcmd__rename_commands] )) ||
_pijul__subcmd__channel__subcmd__rename_commands() {
    local commands; commands=()
    _describe -t commands 'pijul channel rename commands' commands "$@"
}
(( $+functions[_pijul__subcmd__channel__subcmd__switch_commands] )) ||
_pijul__subcmd__channel__subcmd__switch_commands() {
    local commands; commands=()
    _describe -t commands 'pijul channel switch commands' commands "$@"
}
(( $+functions[_pijul__subcmd__client_commands] )) ||
_pijul__subcmd__client_commands() {
    local commands; commands=()
    _describe -t commands 'pijul client commands' commands "$@"
}
(( $+functions[_pijul__subcmd__clone_commands] )) ||
_pijul__subcmd__clone_commands() {
    local commands; commands=()
    _describe -t commands 'pijul clone commands' commands "$@"
}
(( $+functions[_pijul__subcmd__completion_commands] )) ||
_pijul__subcmd__completion_commands() {
    local commands; commands=(
'bash:' \
'elvish:' \
'fish:' \
'power-shell:' \
'zsh:' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'pijul completion commands' commands "$@"
}
(( $+functions[_pijul__subcmd__completion__subcmd__bash_commands] )) ||
_pijul__subcmd__completion__subcmd__bash_commands() {
    local commands; commands=()
    _describe -t commands 'pijul completion bash commands' commands "$@"
}
(( $+functions[_pijul__subcmd__completion__subcmd__elvish_commands] )) ||
_pijul__subcmd__completion__subcmd__elvish_commands() {
    local commands; commands=()
    _describe -t commands 'pijul completion elvish commands' commands "$@"
}
(( $+functions[_pijul__subcmd__completion__subcmd__fish_commands] )) ||
_pijul__subcmd__completion__subcmd__fish_commands() {
    local commands; commands=()
    _describe -t commands 'pijul completion fish commands' commands "$@"
}
(( $+functions[_pijul__subcmd__completion__subcmd__help_commands] )) ||
_pijul__subcmd__completion__subcmd__help_commands() {
    local commands; commands=(
'bash:' \
'elvish:' \
'fish:' \
'power-shell:' \
'zsh:' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'pijul completion help commands' commands "$@"
}
(( $+functions[_pijul__subcmd__completion__subcmd__help__subcmd__bash_commands] )) ||
_pijul__subcmd__completion__subcmd__help__subcmd__bash_commands() {
    local commands; commands=()
    _describe -t commands 'pijul completion help bash commands' commands "$@"
}
(( $+functions[_pijul__subcmd__completion__subcmd__help__subcmd__elvish_commands] )) ||
_pijul__subcmd__completion__subcmd__help__subcmd__elvish_commands() {
    local commands; commands=()
    _describe -t commands 'pijul completion help elvish commands' commands "$@"
}
(( $+functions[_pijul__subcmd__completion__subcmd__help__subcmd__fish_commands] )) ||
_pijul__subcmd__completion__subcmd__help__subcmd__fish_commands() {
    local commands; commands=()
    _describe -t commands 'pijul completion help fish commands' commands "$@"
}
(( $+functions[_pijul__subcmd__completion__subcmd__help__subcmd__help_commands] )) ||
_pijul__subcmd__completion__subcmd__help__subcmd__help_commands() {
    local commands; commands=()
    _describe -t commands 'pijul completion help help commands' commands "$@"
}
(( $+functions[_pijul__subcmd__completion__subcmd__help__subcmd__power-shell_commands] )) ||
_pijul__subcmd__completion__subcmd__help__subcmd__power-shell_commands() {
    local commands; commands=()
    _describe -t commands 'pijul completion help power-shell commands' commands "$@"
}
(( $+functions[_pijul__subcmd__completion__subcmd__help__subcmd__zsh_commands] )) ||
_pijul__subcmd__completion__subcmd__help__subcmd__zsh_commands() {
    local commands; commands=()
    _describe -t commands 'pijul completion help zsh commands' commands "$@"
}
(( $+functions[_pijul__subcmd__completion__subcmd__power-shell_commands] )) ||
_pijul__subcmd__completion__subcmd__power-shell_commands() {
    local commands; commands=()
    _describe -t commands 'pijul completion power-shell commands' commands "$@"
}
(( $+functions[_pijul__subcmd__completion__subcmd__zsh_commands] )) ||
_pijul__subcmd__completion__subcmd__zsh_commands() {
    local commands; commands=()
    _describe -t commands 'pijul completion zsh commands' commands "$@"
}
(( $+functions[_pijul__subcmd__credit_commands] )) ||
_pijul__subcmd__credit_commands() {
    local commands; commands=()
    _describe -t commands 'pijul credit commands' commands "$@"
}
(( $+functions[_pijul__subcmd__debug_commands] )) ||
_pijul__subcmd__debug_commands() {
    local commands; commands=()
    _describe -t commands 'pijul debug commands' commands "$@"
}
(( $+functions[_pijul__subcmd__dependents_commands] )) ||
_pijul__subcmd__dependents_commands() {
    local commands; commands=()
    _describe -t commands 'pijul dependents commands' commands "$@"
}
(( $+functions[_pijul__subcmd__diff_commands] )) ||
_pijul__subcmd__diff_commands() {
    local commands; commands=()
    _describe -t commands 'pijul diff commands' commands "$@"
}
(( $+functions[_pijul__subcmd__docgen_commands] )) ||
_pijul__subcmd__docgen_commands() {
    local commands; commands=(
'man:Generate man pages (one per subcommand) into <outdir>' \
'markdown:Generate markdown reference pages (one per subcommand) into <outdir>' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'pijul docgen commands' commands "$@"
}
(( $+functions[_pijul__subcmd__docgen__subcmd__help_commands] )) ||
_pijul__subcmd__docgen__subcmd__help_commands() {
    local commands; commands=(
'man:Generate man pages (one per subcommand) into <outdir>' \
'markdown:Generate markdown reference pages (one per subcommand) into <outdir>' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'pijul docgen help commands' commands "$@"
}
(( $+functions[_pijul__subcmd__docgen__subcmd__help__subcmd__help_commands] )) ||
_pijul__subcmd__docgen__subcmd__help__subcmd__help_commands() {
    local commands; commands=()
    _describe -t commands 'pijul docgen help help commands' commands "$@"
}
(( $+functions[_pijul__subcmd__docgen__subcmd__help__subcmd__man_commands] )) ||
_pijul__subcmd__docgen__subcmd__help__subcmd__man_commands() {
    local commands; commands=()
    _describe -t commands 'pijul docgen help man commands' commands "$@"
}
(( $+functions[_pijul__subcmd__docgen__subcmd__help__subcmd__markdown_commands] )) ||
_pijul__subcmd__docgen__subcmd__help__subcmd__markdown_commands() {
    local commands; commands=()
    _describe -t commands 'pijul docgen help markdown commands' commands "$@"
}
(( $+functions[_pijul__subcmd__docgen__subcmd__man_commands] )) ||
_pijul__subcmd__docgen__subcmd__man_commands() {
    local commands; commands=()
    _describe -t commands 'pijul docgen man commands' commands "$@"
}
(( $+functions[_pijul__subcmd__docgen__subcmd__markdown_commands] )) ||
_pijul__subcmd__docgen__subcmd__markdown_commands() {
    local commands; commands=()
    _describe -t commands 'pijul docgen markdown commands' commands "$@"
}
(( $+functions[_pijul__subcmd__fork_commands] )) ||
_pijul__subcmd__fork_commands() {
    local commands; commands=()
    _describe -t commands 'pijul fork commands' commands "$@"
}
(( $+functions[_pijul__subcmd__git_commands] )) ||
_pijul__subcmd__git_commands() {
    local commands; commands=()
    _describe -t commands 'pijul git commands' commands "$@"
}
(( $+functions[_pijul__subcmd__help_commands] )) ||
_pijul__subcmd__help_commands() {
    local commands; commands=(
'init:Initializes an empty pijul repository' \
'clone:Clones an existing pijul repository' \
'record:Creates a new change' \
'diff:Shows difference between two channels/changes' \
'status:Shows a brief overview of changes' \
'log:Show the entire log of changes' \
'push:Pushes changes to a remote upstream' \
'pull:Pulls changes from a remote upstream' \
'change:Shows information about a particular change' \
'http-token:Mints an HTTP bearer token for a Nest using your SSH key' \
'dependents:Lists the transitive closure of the reverse dependency relation' \
'channel:Manages different channels' \
'protocol:This command is not meant to be run by the user, instead it is called over SSH' \
'git:Imports a git repository into pijul' \
'move:Moves a file in the working copy and the tree' \
'list:Lists files tracked by pijul' \
'add:Adds a path to the tree' \
'remove:Removes a file from the tree of tracked files (\`pijul record\` will then record this as a deletion)' \
'reset:Resets the working copy to the last recorded change' \
'debug:' \
'replay:Replays a recorded \`.pijul/replay.log\` against a repository (debugging)' \
'fork:Create a new channel' \
'unrecord:Unrecords a list of changes' \
'apply:Applies changes to a channel' \
'remote:Manages remote repositories' \
'archive:Creates an archive of the repository' \
'credit:Shows which change last affected each line of the given file(s)' \
'identity:A collection of tools for interactively managing the user'\''s identities. This may be useful if you use Pijul in multiple contexts, for example both work & personal projects' \
'client:Authenticates with a HTTP server' \
'completion:Shell completion script generation' \
'docgen:Generate man pages or markdown documentation' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'pijul help commands' commands "$@"
}
(( $+functions[_pijul__subcmd__help__subcmd__add_commands] )) ||
_pijul__subcmd__help__subcmd__add_commands() {
    local commands; commands=()
    _describe -t commands 'pijul help add commands' commands "$@"
}
(( $+functions[_pijul__subcmd__help__subcmd__apply_commands] )) ||
_pijul__subcmd__help__subcmd__apply_commands() {
    local commands; commands=()
    _describe -t commands 'pijul help apply commands' commands "$@"
}
(( $+functions[_pijul__subcmd__help__subcmd__archive_commands] )) ||
_pijul__subcmd__help__subcmd__archive_commands() {
    local commands; commands=()
    _describe -t commands 'pijul help archive commands' commands "$@"
}
(( $+functions[_pijul__subcmd__help__subcmd__change_commands] )) ||
_pijul__subcmd__help__subcmd__change_commands() {
    local commands; commands=()
    _describe -t commands 'pijul help change commands' commands "$@"
}
(( $+functions[_pijul__subcmd__help__subcmd__channel_commands] )) ||
_pijul__subcmd__help__subcmd__channel_commands() {
    local commands; commands=(
'delete:Delete a channel. The channel must not be the current channel' \
'rename:Rename a channel' \
'switch:Switch to a channel. There must not be unrecorded changes in the working copy' \
'new:Create a new, empty channel' \
    )
    _describe -t commands 'pijul help channel commands' commands "$@"
}
(( $+functions[_pijul__subcmd__help__subcmd__channel__subcmd__delete_commands] )) ||
_pijul__subcmd__help__subcmd__channel__subcmd__delete_commands() {
    local commands; commands=()
    _describe -t commands 'pijul help channel delete commands' commands "$@"
}
(( $+functions[_pijul__subcmd__help__subcmd__channel__subcmd__new_commands] )) ||
_pijul__subcmd__help__subcmd__channel__subcmd__new_commands() {
    local commands; commands=()
    _describe -t commands 'pijul help channel new commands' commands "$@"
}
(( $+functions[_pijul__subcmd__help__subcmd__channel__subcmd__rename_commands] )) ||
_pijul__subcmd__help__subcmd__channel__subcmd__rename_commands() {
    local commands; commands=()
    _describe -t commands 'pijul help channel rename commands' commands "$@"
}
(( $+functions[_pijul__subcmd__help__subcmd__channel__subcmd__switch_commands] )) ||
_pijul__subcmd__help__subcmd__channel__subcmd__switch_commands() {
    local commands; commands=()
    _describe -t commands 'pijul help channel switch commands' commands "$@"
}
(( $+functions[_pijul__subcmd__help__subcmd__client_commands] )) ||
_pijul__subcmd__help__subcmd__client_commands() {
    local commands; commands=()
    _describe -t commands 'pijul help client commands' commands "$@"
}
(( $+functions[_pijul__subcmd__help__subcmd__clone_commands] )) ||
_pijul__subcmd__help__subcmd__clone_commands() {
    local commands; commands=()
    _describe -t commands 'pijul help clone commands' commands "$@"
}
(( $+functions[_pijul__subcmd__help__subcmd__completion_commands] )) ||
_pijul__subcmd__help__subcmd__completion_commands() {
    local commands; commands=(
'bash:' \
'elvish:' \
'fish:' \
'power-shell:' \
'zsh:' \
    )
    _describe -t commands 'pijul help completion commands' commands "$@"
}
(( $+functions[_pijul__subcmd__help__subcmd__completion__subcmd__bash_commands] )) ||
_pijul__subcmd__help__subcmd__completion__subcmd__bash_commands() {
    local commands; commands=()
    _describe -t commands 'pijul help completion bash commands' commands "$@"
}
(( $+functions[_pijul__subcmd__help__subcmd__completion__subcmd__elvish_commands] )) ||
_pijul__subcmd__help__subcmd__completion__subcmd__elvish_commands() {
    local commands; commands=()
    _describe -t commands 'pijul help completion elvish commands' commands "$@"
}
(( $+functions[_pijul__subcmd__help__subcmd__completion__subcmd__fish_commands] )) ||
_pijul__subcmd__help__subcmd__completion__subcmd__fish_commands() {
    local commands; commands=()
    _describe -t commands 'pijul help completion fish commands' commands "$@"
}
(( $+functions[_pijul__subcmd__help__subcmd__completion__subcmd__power-shell_commands] )) ||
_pijul__subcmd__help__subcmd__completion__subcmd__power-shell_commands() {
    local commands; commands=()
    _describe -t commands 'pijul help completion power-shell commands' commands "$@"
}
(( $+functions[_pijul__subcmd__help__subcmd__completion__subcmd__zsh_commands] )) ||
_pijul__subcmd__help__subcmd__completion__subcmd__zsh_commands() {
    local commands; commands=()
    _describe -t commands 'pijul help completion zsh commands' commands "$@"
}
(( $+functions[_pijul__subcmd__help__subcmd__credit_commands] )) ||
_pijul__subcmd__help__subcmd__credit_commands() {
    local commands; commands=()
    _describe -t commands 'pijul help credit commands' commands "$@"
}
(( $+functions[_pijul__subcmd__help__subcmd__debug_commands] )) ||
_pijul__subcmd__help__subcmd__debug_commands() {
    local commands; commands=()
    _describe -t commands 'pijul help debug commands' commands "$@"
}
(( $+functions[_pijul__subcmd__help__subcmd__dependents_commands] )) ||
_pijul__subcmd__help__subcmd__dependents_commands() {
    local commands; commands=()
    _describe -t commands 'pijul help dependents commands' commands "$@"
}
(( $+functions[_pijul__subcmd__help__subcmd__diff_commands] )) ||
_pijul__subcmd__help__subcmd__diff_commands() {
    local commands; commands=()
    _describe -t commands 'pijul help diff commands' commands "$@"
}
(( $+functions[_pijul__subcmd__help__subcmd__docgen_commands] )) ||
_pijul__subcmd__help__subcmd__docgen_commands() {
    local commands; commands=(
'man:Generate man pages (one per subcommand) into <outdir>' \
'markdown:Generate markdown reference pages (one per subcommand) into <outdir>' \
    )
    _describe -t commands 'pijul help docgen commands' commands "$@"
}
(( $+functions[_pijul__subcmd__help__subcmd__docgen__subcmd__man_commands] )) ||
_pijul__subcmd__help__subcmd__docgen__subcmd__man_commands() {
    local commands; commands=()
    _describe -t commands 'pijul help docgen man commands' commands "$@"
}
(( $+functions[_pijul__subcmd__help__subcmd__docgen__subcmd__markdown_commands] )) ||
_pijul__subcmd__help__subcmd__docgen__subcmd__markdown_commands() {
    local commands; commands=()
    _describe -t commands 'pijul help docgen markdown commands' commands "$@"
}
(( $+functions[_pijul__subcmd__help__subcmd__fork_commands] )) ||
_pijul__subcmd__help__subcmd__fork_commands() {
    local commands; commands=()
    _describe -t commands 'pijul help fork commands' commands "$@"
}
(( $+functions[_pijul__subcmd__help__subcmd__git_commands] )) ||
_pijul__subcmd__help__subcmd__git_commands() {
    local commands; commands=()
    _describe -t commands 'pijul help git commands' commands "$@"
}
(( $+functions[_pijul__subcmd__help__subcmd__help_commands] )) ||
_pijul__subcmd__help__subcmd__help_commands() {
    local commands; commands=()
    _describe -t commands 'pijul help help commands' commands "$@"
}
(( $+functions[_pijul__subcmd__help__subcmd__http-token_commands] )) ||
_pijul__subcmd__help__subcmd__http-token_commands() {
    local commands; commands=()
    _describe -t commands 'pijul help http-token commands' commands "$@"
}
(( $+functions[_pijul__subcmd__help__subcmd__identity_commands] )) ||
_pijul__subcmd__help__subcmd__identity_commands() {
    local commands; commands=(
'new:Create a new identity' \
'repair:Repair the identity state on disk, including migration from older versions of Pijul' \
'prove:Prove an identity to the server' \
'list:Pretty-print all valid identities on disk' \
'edit:Edit an existing identity' \
'remove:Remove an existing identity' \
    )
    _describe -t commands 'pijul help identity commands' commands "$@"
}
(( $+functions[_pijul__subcmd__help__subcmd__identity__subcmd__edit_commands] )) ||
_pijul__subcmd__help__subcmd__identity__subcmd__edit_commands() {
    local commands; commands=()
    _describe -t commands 'pijul help identity edit commands' commands "$@"
}
(( $+functions[_pijul__subcmd__help__subcmd__identity__subcmd__list_commands] )) ||
_pijul__subcmd__help__subcmd__identity__subcmd__list_commands() {
    local commands; commands=()
    _describe -t commands 'pijul help identity list commands' commands "$@"
}
(( $+functions[_pijul__subcmd__help__subcmd__identity__subcmd__new_commands] )) ||
_pijul__subcmd__help__subcmd__identity__subcmd__new_commands() {
    local commands; commands=()
    _describe -t commands 'pijul help identity new commands' commands "$@"
}
(( $+functions[_pijul__subcmd__help__subcmd__identity__subcmd__prove_commands] )) ||
_pijul__subcmd__help__subcmd__identity__subcmd__prove_commands() {
    local commands; commands=()
    _describe -t commands 'pijul help identity prove commands' commands "$@"
}
(( $+functions[_pijul__subcmd__help__subcmd__identity__subcmd__remove_commands] )) ||
_pijul__subcmd__help__subcmd__identity__subcmd__remove_commands() {
    local commands; commands=()
    _describe -t commands 'pijul help identity remove commands' commands "$@"
}
(( $+functions[_pijul__subcmd__help__subcmd__identity__subcmd__repair_commands] )) ||
_pijul__subcmd__help__subcmd__identity__subcmd__repair_commands() {
    local commands; commands=()
    _describe -t commands 'pijul help identity repair commands' commands "$@"
}
(( $+functions[_pijul__subcmd__help__subcmd__init_commands] )) ||
_pijul__subcmd__help__subcmd__init_commands() {
    local commands; commands=()
    _describe -t commands 'pijul help init commands' commands "$@"
}
(( $+functions[_pijul__subcmd__help__subcmd__list_commands] )) ||
_pijul__subcmd__help__subcmd__list_commands() {
    local commands; commands=()
    _describe -t commands 'pijul help list commands' commands "$@"
}
(( $+functions[_pijul__subcmd__help__subcmd__log_commands] )) ||
_pijul__subcmd__help__subcmd__log_commands() {
    local commands; commands=()
    _describe -t commands 'pijul help log commands' commands "$@"
}
(( $+functions[_pijul__subcmd__help__subcmd__move_commands] )) ||
_pijul__subcmd__help__subcmd__move_commands() {
    local commands; commands=()
    _describe -t commands 'pijul help move commands' commands "$@"
}
(( $+functions[_pijul__subcmd__help__subcmd__protocol_commands] )) ||
_pijul__subcmd__help__subcmd__protocol_commands() {
    local commands; commands=()
    _describe -t commands 'pijul help protocol commands' commands "$@"
}
(( $+functions[_pijul__subcmd__help__subcmd__pull_commands] )) ||
_pijul__subcmd__help__subcmd__pull_commands() {
    local commands; commands=()
    _describe -t commands 'pijul help pull commands' commands "$@"
}
(( $+functions[_pijul__subcmd__help__subcmd__push_commands] )) ||
_pijul__subcmd__help__subcmd__push_commands() {
    local commands; commands=()
    _describe -t commands 'pijul help push commands' commands "$@"
}
(( $+functions[_pijul__subcmd__help__subcmd__record_commands] )) ||
_pijul__subcmd__help__subcmd__record_commands() {
    local commands; commands=()
    _describe -t commands 'pijul help record commands' commands "$@"
}
(( $+functions[_pijul__subcmd__help__subcmd__remote_commands] )) ||
_pijul__subcmd__help__subcmd__remote_commands() {
    local commands; commands=(
'default:Set the default remote' \
'delete:Deletes the remote' \
    )
    _describe -t commands 'pijul help remote commands' commands "$@"
}
(( $+functions[_pijul__subcmd__help__subcmd__remote__subcmd__default_commands] )) ||
_pijul__subcmd__help__subcmd__remote__subcmd__default_commands() {
    local commands; commands=()
    _describe -t commands 'pijul help remote default commands' commands "$@"
}
(( $+functions[_pijul__subcmd__help__subcmd__remote__subcmd__delete_commands] )) ||
_pijul__subcmd__help__subcmd__remote__subcmd__delete_commands() {
    local commands; commands=()
    _describe -t commands 'pijul help remote delete commands' commands "$@"
}
(( $+functions[_pijul__subcmd__help__subcmd__remove_commands] )) ||
_pijul__subcmd__help__subcmd__remove_commands() {
    local commands; commands=()
    _describe -t commands 'pijul help remove commands' commands "$@"
}
(( $+functions[_pijul__subcmd__help__subcmd__replay_commands] )) ||
_pijul__subcmd__help__subcmd__replay_commands() {
    local commands; commands=()
    _describe -t commands 'pijul help replay commands' commands "$@"
}
(( $+functions[_pijul__subcmd__help__subcmd__reset_commands] )) ||
_pijul__subcmd__help__subcmd__reset_commands() {
    local commands; commands=()
    _describe -t commands 'pijul help reset commands' commands "$@"
}
(( $+functions[_pijul__subcmd__help__subcmd__status_commands] )) ||
_pijul__subcmd__help__subcmd__status_commands() {
    local commands; commands=()
    _describe -t commands 'pijul help status commands' commands "$@"
}
(( $+functions[_pijul__subcmd__help__subcmd__unrecord_commands] )) ||
_pijul__subcmd__help__subcmd__unrecord_commands() {
    local commands; commands=()
    _describe -t commands 'pijul help unrecord commands' commands "$@"
}
(( $+functions[_pijul__subcmd__http-token_commands] )) ||
_pijul__subcmd__http-token_commands() {
    local commands; commands=()
    _describe -t commands 'pijul http-token commands' commands "$@"
}
(( $+functions[_pijul__subcmd__identity_commands] )) ||
_pijul__subcmd__identity_commands() {
    local commands; commands=(
'new:Create a new identity' \
'repair:Repair the identity state on disk, including migration from older versions of Pijul' \
'prove:Prove an identity to the server' \
'list:Pretty-print all valid identities on disk' \
'edit:Edit an existing identity' \
'remove:Remove an existing identity' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'pijul identity commands' commands "$@"
}
(( $+functions[_pijul__subcmd__identity__subcmd__edit_commands] )) ||
_pijul__subcmd__identity__subcmd__edit_commands() {
    local commands; commands=()
    _describe -t commands 'pijul identity edit commands' commands "$@"
}
(( $+functions[_pijul__subcmd__identity__subcmd__help_commands] )) ||
_pijul__subcmd__identity__subcmd__help_commands() {
    local commands; commands=(
'new:Create a new identity' \
'repair:Repair the identity state on disk, including migration from older versions of Pijul' \
'prove:Prove an identity to the server' \
'list:Pretty-print all valid identities on disk' \
'edit:Edit an existing identity' \
'remove:Remove an existing identity' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'pijul identity help commands' commands "$@"
}
(( $+functions[_pijul__subcmd__identity__subcmd__help__subcmd__edit_commands] )) ||
_pijul__subcmd__identity__subcmd__help__subcmd__edit_commands() {
    local commands; commands=()
    _describe -t commands 'pijul identity help edit commands' commands "$@"
}
(( $+functions[_pijul__subcmd__identity__subcmd__help__subcmd__help_commands] )) ||
_pijul__subcmd__identity__subcmd__help__subcmd__help_commands() {
    local commands; commands=()
    _describe -t commands 'pijul identity help help commands' commands "$@"
}
(( $+functions[_pijul__subcmd__identity__subcmd__help__subcmd__list_commands] )) ||
_pijul__subcmd__identity__subcmd__help__subcmd__list_commands() {
    local commands; commands=()
    _describe -t commands 'pijul identity help list commands' commands "$@"
}
(( $+functions[_pijul__subcmd__identity__subcmd__help__subcmd__new_commands] )) ||
_pijul__subcmd__identity__subcmd__help__subcmd__new_commands() {
    local commands; commands=()
    _describe -t commands 'pijul identity help new commands' commands "$@"
}
(( $+functions[_pijul__subcmd__identity__subcmd__help__subcmd__prove_commands] )) ||
_pijul__subcmd__identity__subcmd__help__subcmd__prove_commands() {
    local commands; commands=()
    _describe -t commands 'pijul identity help prove commands' commands "$@"
}
(( $+functions[_pijul__subcmd__identity__subcmd__help__subcmd__remove_commands] )) ||
_pijul__subcmd__identity__subcmd__help__subcmd__remove_commands() {
    local commands; commands=()
    _describe -t commands 'pijul identity help remove commands' commands "$@"
}
(( $+functions[_pijul__subcmd__identity__subcmd__help__subcmd__repair_commands] )) ||
_pijul__subcmd__identity__subcmd__help__subcmd__repair_commands() {
    local commands; commands=()
    _describe -t commands 'pijul identity help repair commands' commands "$@"
}
(( $+functions[_pijul__subcmd__identity__subcmd__list_commands] )) ||
_pijul__subcmd__identity__subcmd__list_commands() {
    local commands; commands=()
    _describe -t commands 'pijul identity list commands' commands "$@"
}
(( $+functions[_pijul__subcmd__identity__subcmd__new_commands] )) ||
_pijul__subcmd__identity__subcmd__new_commands() {
    local commands; commands=()
    _describe -t commands 'pijul identity new commands' commands "$@"
}
(( $+functions[_pijul__subcmd__identity__subcmd__prove_commands] )) ||
_pijul__subcmd__identity__subcmd__prove_commands() {
    local commands; commands=()
    _describe -t commands 'pijul identity prove commands' commands "$@"
}
(( $+functions[_pijul__subcmd__identity__subcmd__remove_commands] )) ||
_pijul__subcmd__identity__subcmd__remove_commands() {
    local commands; commands=()
    _describe -t commands 'pijul identity remove commands' commands "$@"
}
(( $+functions[_pijul__subcmd__identity__subcmd__repair_commands] )) ||
_pijul__subcmd__identity__subcmd__repair_commands() {
    local commands; commands=()
    _describe -t commands 'pijul identity repair commands' commands "$@"
}
(( $+functions[_pijul__subcmd__init_commands] )) ||
_pijul__subcmd__init_commands() {
    local commands; commands=()
    _describe -t commands 'pijul init commands' commands "$@"
}
(( $+functions[_pijul__subcmd__list_commands] )) ||
_pijul__subcmd__list_commands() {
    local commands; commands=()
    _describe -t commands 'pijul list commands' commands "$@"
}
(( $+functions[_pijul__subcmd__log_commands] )) ||
_pijul__subcmd__log_commands() {
    local commands; commands=()
    _describe -t commands 'pijul log commands' commands "$@"
}
(( $+functions[_pijul__subcmd__move_commands] )) ||
_pijul__subcmd__move_commands() {
    local commands; commands=()
    _describe -t commands 'pijul move commands' commands "$@"
}
(( $+functions[_pijul__subcmd__protocol_commands] )) ||
_pijul__subcmd__protocol_commands() {
    local commands; commands=()
    _describe -t commands 'pijul protocol commands' commands "$@"
}
(( $+functions[_pijul__subcmd__pull_commands] )) ||
_pijul__subcmd__pull_commands() {
    local commands; commands=()
    _describe -t commands 'pijul pull commands' commands "$@"
}
(( $+functions[_pijul__subcmd__push_commands] )) ||
_pijul__subcmd__push_commands() {
    local commands; commands=()
    _describe -t commands 'pijul push commands' commands "$@"
}
(( $+functions[_pijul__subcmd__record_commands] )) ||
_pijul__subcmd__record_commands() {
    local commands; commands=()
    _describe -t commands 'pijul record commands' commands "$@"
}
(( $+functions[_pijul__subcmd__remote_commands] )) ||
_pijul__subcmd__remote_commands() {
    local commands; commands=(
'default:Set the default remote' \
'delete:Deletes the remote' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'pijul remote commands' commands "$@"
}
(( $+functions[_pijul__subcmd__remote__subcmd__default_commands] )) ||
_pijul__subcmd__remote__subcmd__default_commands() {
    local commands; commands=()
    _describe -t commands 'pijul remote default commands' commands "$@"
}
(( $+functions[_pijul__subcmd__remote__subcmd__delete_commands] )) ||
_pijul__subcmd__remote__subcmd__delete_commands() {
    local commands; commands=()
    _describe -t commands 'pijul remote delete commands' commands "$@"
}
(( $+functions[_pijul__subcmd__remote__subcmd__help_commands] )) ||
_pijul__subcmd__remote__subcmd__help_commands() {
    local commands; commands=(
'default:Set the default remote' \
'delete:Deletes the remote' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'pijul remote help commands' commands "$@"
}
(( $+functions[_pijul__subcmd__remote__subcmd__help__subcmd__default_commands] )) ||
_pijul__subcmd__remote__subcmd__help__subcmd__default_commands() {
    local commands; commands=()
    _describe -t commands 'pijul remote help default commands' commands "$@"
}
(( $+functions[_pijul__subcmd__remote__subcmd__help__subcmd__delete_commands] )) ||
_pijul__subcmd__remote__subcmd__help__subcmd__delete_commands() {
    local commands; commands=()
    _describe -t commands 'pijul remote help delete commands' commands "$@"
}
(( $+functions[_pijul__subcmd__remote__subcmd__help__subcmd__help_commands] )) ||
_pijul__subcmd__remote__subcmd__help__subcmd__help_commands() {
    local commands; commands=()
    _describe -t commands 'pijul remote help help commands' commands "$@"
}
(( $+functions[_pijul__subcmd__remove_commands] )) ||
_pijul__subcmd__remove_commands() {
    local commands; commands=()
    _describe -t commands 'pijul remove commands' commands "$@"
}
(( $+functions[_pijul__subcmd__replay_commands] )) ||
_pijul__subcmd__replay_commands() {
    local commands; commands=()
    _describe -t commands 'pijul replay commands' commands "$@"
}
(( $+functions[_pijul__subcmd__reset_commands] )) ||
_pijul__subcmd__reset_commands() {
    local commands; commands=()
    _describe -t commands 'pijul reset commands' commands "$@"
}
(( $+functions[_pijul__subcmd__status_commands] )) ||
_pijul__subcmd__status_commands() {
    local commands; commands=()
    _describe -t commands 'pijul status commands' commands "$@"
}
(( $+functions[_pijul__subcmd__unrecord_commands] )) ||
_pijul__subcmd__unrecord_commands() {
    local commands; commands=()
    _describe -t commands 'pijul unrecord commands' commands "$@"
}

if [ "$funcstack[1]" = "_pijul" ]; then
    _pijul "$@"
else
    compdef _pijul pijul
fi
