#compdef rledger

autoload -U is-at-least

_rledger() {
    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+[Use a specific profile from config]:PROFILE:_default' \
'--profile=[Use a specific profile from config]:PROFILE:_default' \
'-h[Print help]' \
'--help[Print help]' \
'-V[Print version]' \
'--version[Print version]' \
":: :_rledger_commands" \
"*::: :->rledger" \
&& ret=0
    case $state in
    (rledger)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:rledger-command-$line[1]:"
        case $line[1] in
            (check)
_arguments "${_arguments_options[@]}" : \
'--generate-completions=[Generate shell completions and exit]:SHELL:((bash\:"Bash shell completions"
zsh\:"Zsh shell completions"
fish\:"Fish shell completions"
powershell\:"\`PowerShell\` completions"
elvish\:"Elvish shell completions"
nushell\:"Nushell completions"))' \
'--cache-filename=[Override the cache filename (not yet implemented)]:CACHE_FILE:_files' \
'*--plugin=[Load a WASM plugin (can be specified multiple times)]:WASM_FILE:_files' \
'*--native-plugin=[Run built-in native plugins (e.g., \`implicit_prices\`, \`check_commodity\`)]:NAME:_default' \
'-f+[Output format (text or json)]:FORMAT:((text\:"Human-readable text output (default)"
json\:"JSON output for IDE/tooling integration"))' \
'--format=[Output format (text or json)]:FORMAT:((text\:"Human-readable text output (default)"
json\:"JSON output for IDE/tooling integration"))' \
'-P+[Use a specific profile from config]:PROFILE:_default' \
'--profile=[Use a specific profile from config]:PROFILE:_default' \
'-v[Show verbose output including timing information]' \
'--verbose[Show verbose output including timing information]' \
'-q[Suppress all output (just use exit code)]' \
'--quiet[Suppress all output (just use exit code)]' \
'-C[Disable the binary cache for parsed directives]' \
'--no-cache[Disable the binary cache for parsed directives]' \
'-a[Implicitly enable auto-plugins (\`auto_accounts\`, etc.)]' \
'--auto[Implicitly enable auto-plugins (\`auto_accounts\`, etc.)]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'-V[Print version]' \
'--version[Print version]' \
'::file -- The beancount file to check (uses config default if not specified):_files' \
&& ret=0
;;
(query)
_arguments "${_arguments_options[@]}" : \
'--generate-completions=[Generate shell completions and exit]:SHELL:((bash\:"Bash shell completions"
zsh\:"Zsh shell completions"
fish\:"Fish shell completions"
powershell\:"\`PowerShell\` completions"
elvish\:"Elvish shell completions"
nushell\:"Nushell completions"))' \
'-F+[Read query from file]:QUERY_FILE:_files' \
'--query-file=[Read query from file]:QUERY_FILE:_files' \
'-o+[Output file (default\: stdout)]:OUTPUT_FILE:_files' \
'--output=[Output file (default\: stdout)]:OUTPUT_FILE:_files' \
'-f+[Output format (text, csv, json, beancount)]:FORMAT:((text\:"Plain text output (default)"
csv\:"CSV output"
json\:"JSON output"
beancount\:"Beancount directive output"))' \
'--format=[Output format (text, csv, json, beancount)]:FORMAT:((text\:"Plain text output (default)"
csv\:"CSV output"
json\:"JSON output"
beancount\:"Beancount directive output"))' \
'-P+[Use a specific profile from config]:PROFILE:_default' \
'--profile=[Use a specific profile from config]:PROFILE:_default' \
'-m[Numberify output (remove currencies, output raw numbers)]' \
'--numberify[Numberify output (remove currencies, output raw numbers)]' \
'-q[Do not report ledger validation errors on load]' \
'--no-errors[Do not report ledger validation errors on load]' \
'-v[Show verbose output]' \
'--verbose[Show verbose output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'-V[Print version]' \
'--version[Print version]' \
'::file -- The beancount file to query (uses config default if not specified):_files' \
'*::query -- BQL query to execute (if not provided, enters interactive mode):_default' \
&& ret=0
;;
(format)
_arguments "${_arguments_options[@]}" : \
'--generate-completions=[Generate shell completions and exit]:SHELL:((bash\:"Bash shell completions"
zsh\:"Zsh shell completions"
fish\:"Fish shell completions"
powershell\:"\`PowerShell\` completions"
elvish\:"Elvish shell completions"
nushell\:"Nushell completions"))' \
'-o+[Output file (only valid with single input file, default\: stdout)]:OUTPUT:_files' \
'--output=[Output file (only valid with single input file, default\: stdout)]:OUTPUT:_files' \
'-c+[Column for aligning currencies (same as --currency-column)]:COLUMN:_default' \
'--currency-column=[Column for aligning currencies (same as --currency-column)]:COLUMN:_default' \
'-w+[Force fixed prefix width (account name column width)]:PREFIX_WIDTH:_default' \
'--prefix-width=[Force fixed prefix width (account name column width)]:PREFIX_WIDTH:_default' \
'-W+[Force fixed numbers width]:NUM_WIDTH:_default' \
'--num-width=[Force fixed numbers width]:NUM_WIDTH:_default' \
'--indent=[Number of spaces for posting indentation (default\: 2)]:INDENT:_default' \
'-P+[Use a specific profile from config]:PROFILE:_default' \
'--profile=[Use a specific profile from config]:PROFILE:_default' \
'-i[Format file(s) in place]' \
'--in-place[Format file(s) in place]' \
'--check[Check if file is formatted (exit 1 if not)]' \
'--diff[Show diff when using --check]' \
'-v[Show verbose output]' \
'--verbose[Show verbose output]' \
'-h[Print help]' \
'--help[Print help]' \
'-V[Print version]' \
'--version[Print version]' \
'*::files -- The beancount file(s) to format (uses config default if not specified):_files' \
&& ret=0
;;
(report)
_arguments "${_arguments_options[@]}" : \
'--generate-completions=[Generate shell completions and exit]:SHELL:((bash\:"Bash shell completions"
zsh\:"Zsh shell completions"
fish\:"Fish shell completions"
powershell\:"\`PowerShell\` completions"
elvish\:"Elvish shell completions"
nushell\:"Nushell completions"))' \
'-f+[Output format (text, csv, json)]:FORMAT:((text\:"Plain text output"
csv\:"CSV output"
json\:"JSON output"))' \
'--format=[Output format (text, csv, json)]:FORMAT:((text\:"Plain text output"
csv\:"CSV output"
json\:"JSON output"))' \
'-P+[Use a specific profile from config]:PROFILE:_default' \
'--profile=[Use a specific profile from config]:PROFILE:_default' \
'-v[Show verbose output]' \
'--verbose[Show verbose output]' \
'--no-pager[Disable pager for output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'-V[Print version]' \
'--version[Print version]' \
'::file -- The beancount file to process:_files' \
":: :_rledger__subcmd__report_commands" \
"*::: :->report" \
&& ret=0

    case $state in
    (report)
        words=($line[2] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:rledger-report-command-$line[2]:"
        case $line[2] in
            (balances)
_arguments "${_arguments_options[@]}" : \
'-a+[Filter to accounts matching this prefix]:ACCOUNT:_default' \
'--account=[Filter to accounts matching this prefix]:ACCOUNT:_default' \
'-f+[Output format (text, csv, json)]:FORMAT:((text\:"Plain text output"
csv\:"CSV output"
json\:"JSON output"))' \
'--format=[Output format (text, csv, json)]:FORMAT:((text\:"Plain text output"
csv\:"CSV output"
json\:"JSON output"))' \
'-P+[Use a specific profile from config]:PROFILE:_default' \
'--profile=[Use a specific profile from config]:PROFILE:_default' \
'-v[Show verbose output]' \
'--verbose[Show verbose output]' \
'--no-pager[Disable pager for output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'-V[Print version]' \
'--version[Print version]' \
&& ret=0
;;
(balsheet)
_arguments "${_arguments_options[@]}" : \
'-f+[Output format (text, csv, json)]:FORMAT:((text\:"Plain text output"
csv\:"CSV output"
json\:"JSON output"))' \
'--format=[Output format (text, csv, json)]:FORMAT:((text\:"Plain text output"
csv\:"CSV output"
json\:"JSON output"))' \
'-P+[Use a specific profile from config]:PROFILE:_default' \
'--profile=[Use a specific profile from config]:PROFILE:_default' \
'-v[Show verbose output]' \
'--verbose[Show verbose output]' \
'--no-pager[Disable pager for output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'-V[Print version]' \
'--version[Print version]' \
&& ret=0
;;
(income)
_arguments "${_arguments_options[@]}" : \
'-f+[Output format (text, csv, json)]:FORMAT:((text\:"Plain text output"
csv\:"CSV output"
json\:"JSON output"))' \
'--format=[Output format (text, csv, json)]:FORMAT:((text\:"Plain text output"
csv\:"CSV output"
json\:"JSON output"))' \
'-P+[Use a specific profile from config]:PROFILE:_default' \
'--profile=[Use a specific profile from config]:PROFILE:_default' \
'-v[Show verbose output]' \
'--verbose[Show verbose output]' \
'--no-pager[Disable pager for output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'-V[Print version]' \
'--version[Print version]' \
&& ret=0
;;
(journal)
_arguments "${_arguments_options[@]}" : \
'-a+[Filter to accounts matching this prefix]:ACCOUNT:_default' \
'--account=[Filter to accounts matching this prefix]:ACCOUNT:_default' \
'-l+[Limit number of entries]:LIMIT:_default' \
'--limit=[Limit number of entries]:LIMIT:_default' \
'-f+[Output format (text, csv, json)]:FORMAT:((text\:"Plain text output"
csv\:"CSV output"
json\:"JSON output"))' \
'--format=[Output format (text, csv, json)]:FORMAT:((text\:"Plain text output"
csv\:"CSV output"
json\:"JSON output"))' \
'-P+[Use a specific profile from config]:PROFILE:_default' \
'--profile=[Use a specific profile from config]:PROFILE:_default' \
'-v[Show verbose output]' \
'--verbose[Show verbose output]' \
'--no-pager[Disable pager for output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'-V[Print version]' \
'--version[Print version]' \
&& ret=0
;;
(holdings)
_arguments "${_arguments_options[@]}" : \
'-a+[Filter to accounts matching this prefix]:ACCOUNT:_default' \
'--account=[Filter to accounts matching this prefix]:ACCOUNT:_default' \
'-f+[Output format (text, csv, json)]:FORMAT:((text\:"Plain text output"
csv\:"CSV output"
json\:"JSON output"))' \
'--format=[Output format (text, csv, json)]:FORMAT:((text\:"Plain text output"
csv\:"CSV output"
json\:"JSON output"))' \
'-P+[Use a specific profile from config]:PROFILE:_default' \
'--profile=[Use a specific profile from config]:PROFILE:_default' \
'-v[Show verbose output]' \
'--verbose[Show verbose output]' \
'--no-pager[Disable pager for output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'-V[Print version]' \
'--version[Print version]' \
&& ret=0
;;
(networth)
_arguments "${_arguments_options[@]}" : \
'-p+[Group by period (daily, weekly, monthly, yearly)]:PERIOD:_default' \
'--period=[Group by period (daily, weekly, monthly, yearly)]:PERIOD:_default' \
'-c+[Filter to specific currency (e.g., USD, EUR)]:CURRENCY:_default' \
'--currency=[Filter to specific currency (e.g., USD, EUR)]:CURRENCY:_default' \
'-a+[Filter to accounts matching this prefix]:ACCOUNT:_default' \
'--account=[Filter to accounts matching this prefix]:ACCOUNT:_default' \
'-f+[Output format (text, csv, json)]:FORMAT:((text\:"Plain text output"
csv\:"CSV output"
json\:"JSON output"))' \
'--format=[Output format (text, csv, json)]:FORMAT:((text\:"Plain text output"
csv\:"CSV output"
json\:"JSON output"))' \
'-P+[Use a specific profile from config]:PROFILE:_default' \
'--profile=[Use a specific profile from config]:PROFILE:_default' \
'--no-zero[Hide zero balances]' \
'-v[Show verbose output]' \
'--verbose[Show verbose output]' \
'--no-pager[Disable pager for output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'-V[Print version]' \
'--version[Print version]' \
&& ret=0
;;
(accounts)
_arguments "${_arguments_options[@]}" : \
'-f+[Output format (text, csv, json)]:FORMAT:((text\:"Plain text output"
csv\:"CSV output"
json\:"JSON output"))' \
'--format=[Output format (text, csv, json)]:FORMAT:((text\:"Plain text output"
csv\:"CSV output"
json\:"JSON output"))' \
'-P+[Use a specific profile from config]:PROFILE:_default' \
'--profile=[Use a specific profile from config]:PROFILE:_default' \
'-v[Show verbose output]' \
'--verbose[Show verbose output]' \
'--no-pager[Disable pager for output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'-V[Print version]' \
'--version[Print version]' \
&& ret=0
;;
(commodities)
_arguments "${_arguments_options[@]}" : \
'-f+[Output format (text, csv, json)]:FORMAT:((text\:"Plain text output"
csv\:"CSV output"
json\:"JSON output"))' \
'--format=[Output format (text, csv, json)]:FORMAT:((text\:"Plain text output"
csv\:"CSV output"
json\:"JSON output"))' \
'-P+[Use a specific profile from config]:PROFILE:_default' \
'--profile=[Use a specific profile from config]:PROFILE:_default' \
'-v[Show verbose output]' \
'--verbose[Show verbose output]' \
'--no-pager[Disable pager for output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'-V[Print version]' \
'--version[Print version]' \
&& ret=0
;;
(stats)
_arguments "${_arguments_options[@]}" : \
'-f+[Output format (text, csv, json)]:FORMAT:((text\:"Plain text output"
csv\:"CSV output"
json\:"JSON output"))' \
'--format=[Output format (text, csv, json)]:FORMAT:((text\:"Plain text output"
csv\:"CSV output"
json\:"JSON output"))' \
'-P+[Use a specific profile from config]:PROFILE:_default' \
'--profile=[Use a specific profile from config]:PROFILE:_default' \
'-v[Show verbose output]' \
'--verbose[Show verbose output]' \
'--no-pager[Disable pager for output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'-V[Print version]' \
'--version[Print version]' \
&& ret=0
;;
(prices)
_arguments "${_arguments_options[@]}" : \
'-c+[Filter to specific commodity]:COMMODITY:_default' \
'--commodity=[Filter to specific commodity]:COMMODITY:_default' \
'-f+[Output format (text, csv, json)]:FORMAT:((text\:"Plain text output"
csv\:"CSV output"
json\:"JSON output"))' \
'--format=[Output format (text, csv, json)]:FORMAT:((text\:"Plain text output"
csv\:"CSV output"
json\:"JSON output"))' \
'-P+[Use a specific profile from config]:PROFILE:_default' \
'--profile=[Use a specific profile from config]:PROFILE:_default' \
'-v[Show verbose output]' \
'--verbose[Show verbose output]' \
'--no-pager[Disable pager for output]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'-V[Print version]' \
'--version[Print version]' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_rledger__subcmd__report__subcmd__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:rledger-report-help-command-$line[1]:"
        case $line[1] in
            (balances)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(balsheet)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(income)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(journal)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(holdings)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(networth)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(accounts)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(commodities)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(stats)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(prices)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
;;
(doctor)
_arguments "${_arguments_options[@]}" : \
'--generate-completions=[Generate shell completions and exit]:SHELL:((bash\:"Bash shell completions"
zsh\:"Zsh shell completions"
fish\:"Fish shell completions"
powershell\:"\`PowerShell\` completions"
elvish\:"Elvish shell completions"
nushell\:"Nushell completions"))' \
'-P+[Use a specific profile from config]:PROFILE:_default' \
'--profile=[Use a specific profile from config]:PROFILE:_default' \
'-h[Print help]' \
'--help[Print help]' \
'-V[Print version]' \
'--version[Print version]' \
":: :_rledger__subcmd__doctor_commands" \
"*::: :->doctor" \
&& ret=0

    case $state in
    (doctor)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:rledger-doctor-command-$line[1]:"
        case $line[1] in
            (lex)
_arguments "${_arguments_options[@]}" : \
'-P+[Use a specific profile from config]:PROFILE:_default' \
'--profile=[Use a specific profile from config]:PROFILE:_default' \
'-h[Print help]' \
'--help[Print help]' \
'-V[Print version]' \
'--version[Print version]' \
':file -- The beancount file to lex:_files' \
&& ret=0
;;
(parse)
_arguments "${_arguments_options[@]}" : \
'-P+[Use a specific profile from config]:PROFILE:_default' \
'--profile=[Use a specific profile from config]:PROFILE:_default' \
'-v[Show detailed output]' \
'--verbose[Show detailed output]' \
'-h[Print help]' \
'--help[Print help]' \
'-V[Print version]' \
'--version[Print version]' \
':file -- The beancount file to parse:_files' \
&& ret=0
;;
(context)
_arguments "${_arguments_options[@]}" : \
'-P+[Use a specific profile from config]:PROFILE:_default' \
'--profile=[Use a specific profile from config]:PROFILE:_default' \
'-h[Print help]' \
'--help[Print help]' \
'-V[Print version]' \
'--version[Print version]' \
':file -- The beancount file:_files' \
':line -- Line number to show context for:_default' \
&& ret=0
;;
(linked)
_arguments "${_arguments_options[@]}" : \
'-P+[Use a specific profile from config]:PROFILE:_default' \
'--profile=[Use a specific profile from config]:PROFILE:_default' \
'-h[Print help]' \
'--help[Print help]' \
'-V[Print version]' \
'--version[Print version]' \
':file -- The beancount file:_files' \
':location -- Link name (^link), tag name (#tag), or line number:_default' \
&& ret=0
;;
(missing-open)
_arguments "${_arguments_options[@]}" : \
'-P+[Use a specific profile from config]:PROFILE:_default' \
'--profile=[Use a specific profile from config]:PROFILE:_default' \
'-h[Print help]' \
'--help[Print help]' \
'-V[Print version]' \
'--version[Print version]' \
':file -- The beancount file:_files' \
&& ret=0
;;
(list-options)
_arguments "${_arguments_options[@]}" : \
'-P+[Use a specific profile from config]:PROFILE:_default' \
'--profile=[Use a specific profile from config]:PROFILE:_default' \
'-h[Print help]' \
'--help[Print help]' \
'-V[Print version]' \
'--version[Print version]' \
&& ret=0
;;
(print-options)
_arguments "${_arguments_options[@]}" : \
'-P+[Use a specific profile from config]:PROFILE:_default' \
'--profile=[Use a specific profile from config]:PROFILE:_default' \
'-h[Print help]' \
'--help[Print help]' \
'-V[Print version]' \
'--version[Print version]' \
':file -- The beancount file:_files' \
&& ret=0
;;
(stats)
_arguments "${_arguments_options[@]}" : \
'-P+[Use a specific profile from config]:PROFILE:_default' \
'--profile=[Use a specific profile from config]:PROFILE:_default' \
'-h[Print help]' \
'--help[Print help]' \
'-V[Print version]' \
'--version[Print version]' \
':file -- The beancount file:_files' \
&& ret=0
;;
(display-context)
_arguments "${_arguments_options[@]}" : \
'-P+[Use a specific profile from config]:PROFILE:_default' \
'--profile=[Use a specific profile from config]:PROFILE:_default' \
'-h[Print help]' \
'--help[Print help]' \
'-V[Print version]' \
'--version[Print version]' \
':file -- The beancount file:_files' \
&& ret=0
;;
(roundtrip)
_arguments "${_arguments_options[@]}" : \
'-P+[Use a specific profile from config]:PROFILE:_default' \
'--profile=[Use a specific profile from config]:PROFILE:_default' \
'-h[Print help]' \
'--help[Print help]' \
'-V[Print version]' \
'--version[Print version]' \
':file -- The beancount file:_files' \
&& ret=0
;;
(directories)
_arguments "${_arguments_options[@]}" : \
'-P+[Use a specific profile from config]:PROFILE:_default' \
'--profile=[Use a specific profile from config]:PROFILE:_default' \
'-h[Print help]' \
'--help[Print help]' \
'-V[Print version]' \
'--version[Print version]' \
':file -- The beancount file:_files' \
'*::dirs -- Directory roots to validate:_files' \
&& ret=0
;;
(region)
_arguments "${_arguments_options[@]}" : \
'--conversion=[Convert balances to market value or cost]:CONVERSION:((value\:"Convert to market value using price database"
cost\:"Convert to cost basis"))' \
'-P+[Use a specific profile from config]:PROFILE:_default' \
'--profile=[Use a specific profile from config]:PROFILE:_default' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'-V[Print version]' \
'--version[Print version]' \
':file -- The beancount file:_files' \
':start_line -- Start line number:_default' \
':end_line -- End line number:_default' \
&& ret=0
;;
(generate-synthetic)
_arguments "${_arguments_options[@]}" : \
'-o+[Output directory for generated files]:OUTPUT:_files' \
'--output=[Output directory for generated files]:OUTPUT:_files' \
'-c+[Number of files to generate (for proptest-style generation)]:COUNT:_default' \
'--count=[Number of files to generate (for proptest-style generation)]:COUNT:_default' \
'-s+[Random seed for reproducibility]:SEED:_default' \
'--seed=[Random seed for reproducibility]:SEED:_default' \
'-P+[Use a specific profile from config]:PROFILE:_default' \
'--profile=[Use a specific profile from config]:PROFILE:_default' \
'--skip-validation[Skip bean-check validation (faster but may produce invalid files)]' \
'--manifest[Write manifest file tracking generated files]' \
'--edge-cases-only[Generate edge case files only]' \
'-h[Print help]' \
'--help[Print help]' \
'-V[Print version]' \
'--version[Print version]' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_rledger__subcmd__doctor__subcmd__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:rledger-doctor-help-command-$line[1]:"
        case $line[1] in
            (lex)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(parse)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(context)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(linked)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(missing-open)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(list-options)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(print-options)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(stats)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(display-context)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(roundtrip)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(directories)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(region)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(generate-synthetic)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
;;
(extract)
_arguments "${_arguments_options[@]}" : \
'--generate-completions=[Generate shell completions and exit]:SHELL:((bash\:"Bash shell completions"
zsh\:"Zsh shell completions"
fish\:"Fish shell completions"
powershell\:"\`PowerShell\` completions"
elvish\:"Elvish shell completions"
nushell\:"Nushell completions"))' \
'-i+[Use a named importer from importers.toml]:IMPORTER:_default' \
'--importer=[Use a named importer from importers.toml]:IMPORTER:_default' \
'--config=[Path to importers.toml configuration file]:CONFIG:_files' \
'-a+[Target account for imported transactions]:ACCOUNT:_default' \
'--account=[Target account for imported transactions]:ACCOUNT:_default' \
'-c+[Currency for amounts (default\: USD)]:CURRENCY:_default' \
'--currency=[Currency for amounts (default\: USD)]:CURRENCY:_default' \
'--date-column=[Date column name or index]:DATE_COLUMN:_default' \
'--date-format=[Date format (strftime-style)]:DATE_FORMAT:_default' \
'--narration-column=[Narration/description column name or index]:NARRATION_COLUMN:_default' \
'--payee-column=[Payee column name (optional)]:PAYEE_COLUMN:_default' \
'--amount-column=[Amount column name or index]:AMOUNT_COLUMN:_default' \
'--amount-locale=[Locale used to parse amounts, e.g. \`en_US\`]:AMOUNT_LOCALE:_default' \
'--amount-format=[Custom formatting for parsing amounts]:AMOUNT_FORMAT:_default' \
'--debit-column=[Debit column (for separate debit/credit columns)]:DEBIT_COLUMN:_default' \
'--credit-column=[Credit column (for separate debit/credit columns)]:CREDIT_COLUMN:_default' \
'--delimiter=[CSV delimiter]:DELIMITER:_default' \
'--skip-rows=[Number of header rows to skip]:SKIP_ROWS:_default' \
'-o+[Write output to a file instead of stdout]:FILE:_files' \
'--output=[Write output to a file instead of stdout]:FILE:_files' \
'--existing=[Existing ledger file for duplicate detection]:FILE:_files' \
'--balance=[Append a balance assertion with the given amount (e.g., "1234.56")]:AMOUNT:_default' \
'--balance-date=[Date for the balance assertion (defaults to today)]:DATE:_default' \
'-P+[Use a specific profile from config]:PROFILE:_default' \
'--profile=[Use a specific profile from config]:PROFILE:_default' \
'--list-importers[List available importers from config file and exit]' \
'--invert-sign[Invert sign of amounts]' \
'(--date-column --date-format --narration-column --amount-column --delimiter --skip-rows --no-header --debit-column --credit-column --payee-column)--auto[Auto-detect CSV format (delimiter, columns, date format)]' \
'--no-header[CSV has no header row]' \
'-h[Print help]' \
'--help[Print help]' \
'-V[Print version]' \
'--version[Print version]' \
'::file -- The file to extract transactions from:_files' \
&& ret=0
;;
(price)
_arguments "${_arguments_options[@]}" : \
'--generate-completions=[Generate shell completions for the specified shell]:SHELL:((bash\:"Bash shell completions"
zsh\:"Zsh shell completions"
fish\:"Fish shell completions"
powershell\:"\`PowerShell\` completions"
elvish\:"Elvish shell completions"
nushell\:"Nushell completions"))' \
'-f+[Beancount file to read commodities from (optional)]:FILE:_files' \
'--file=[Beancount file to read commodities from (optional)]:FILE:_files' \
'-c+[Base currency for price quotes]:CURRENCY:_default' \
'--currency=[Base currency for price quotes]:CURRENCY:_default' \
'-d+[Date for prices (YYYY-MM-DD, defaults to today)]:DATE:_default' \
'--date=[Date for prices (YYYY-MM-DD, defaults to today)]:DATE:_default' \
'*-m+[Symbol mapping (e.g., VTI\:VTI,BTC\:BTC-USD). Maps commodity names to ticker symbols]:MAPPING:_default' \
'*--mapping=[Symbol mapping (e.g., VTI\:VTI,BTC\:BTC-USD). Maps commodity names to ticker symbols]:MAPPING:_default' \
'-s+[Use specific source (overrides mapping)]:SOURCE:_default' \
'--source=[Use specific source (overrides mapping)]:SOURCE:_default' \
'--source-cmd=[Use ad-hoc external command as source. The command receives the ticker as the first argument]:CMD:_default' \
'-P+[Use a specific profile from config]:PROFILE:_default' \
'--profile=[Use a specific profile from config]:PROFILE:_default' \
'-b[Output as beancount price directives]' \
'--beancount[Output as beancount price directives]' \
'-v[Show verbose output]' \
'--verbose[Show verbose output]' \
'--list-sources[List configured sources and exit]' \
'--no-cache[Disable the price cache for this run]' \
'--clear-cache[Clear the price cache before fetching]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'-V[Print version]' \
'--version[Print version]' \
'*::symbols -- Specific commodity symbols to fetch (e.g., AAPL, MSFT):_default' \
&& ret=0
;;
(config)
_arguments "${_arguments_options[@]}" : \
'-P+[Use a specific profile from config]:PROFILE:_default' \
'--profile=[Use a specific profile from config]:PROFILE:_default' \
'-h[Print help]' \
'--help[Print help]' \
'-V[Print version]' \
'--version[Print version]' \
":: :_rledger__subcmd__config_commands" \
"*::: :->config" \
&& ret=0

    case $state in
    (config)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:rledger-config-command-$line[1]:"
        case $line[1] in
            (show)
_arguments "${_arguments_options[@]}" : \
'-f+[Output format (toml, json)]:FORMAT:_default' \
'--format=[Output format (toml, json)]:FORMAT:_default' \
'-P+[Use a specific profile from config]:PROFILE:_default' \
'--profile=[Use a specific profile from config]:PROFILE:_default' \
'--raw[Show raw configs without merging (one per source)]' \
'-h[Print help]' \
'--help[Print help]' \
'-V[Print version]' \
'--version[Print version]' \
&& ret=0
;;
(path)
_arguments "${_arguments_options[@]}" : \
'-P+[Use a specific profile from config]:PROFILE:_default' \
'--profile=[Use a specific profile from config]:PROFILE:_default' \
'-h[Print help]' \
'--help[Print help]' \
'-V[Print version]' \
'--version[Print version]' \
&& ret=0
;;
(edit)
_arguments "${_arguments_options[@]}" : \
'-P+[Use a specific profile from config]:PROFILE:_default' \
'--profile=[Use a specific profile from config]:PROFILE:_default' \
'(--system)--project[Edit project config instead of user config]' \
'(--project)--system[Edit system config instead of user config]' \
'-h[Print help]' \
'--help[Print help]' \
'-V[Print version]' \
'--version[Print version]' \
&& ret=0
;;
(init)
_arguments "${_arguments_options[@]}" : \
'-P+[Use a specific profile from config]:PROFILE:_default' \
'--profile=[Use a specific profile from config]:PROFILE:_default' \
'--project[Create project config (.rledger.toml) instead of user config]' \
'-f[Overwrite existing config file]' \
'--force[Overwrite existing config file]' \
'-h[Print help]' \
'--help[Print help]' \
'-V[Print version]' \
'--version[Print version]' \
&& ret=0
;;
(aliases)
_arguments "${_arguments_options[@]}" : \
'-P+[Use a specific profile from config]:PROFILE:_default' \
'--profile=[Use a specific profile from config]:PROFILE:_default' \
'-h[Print help]' \
'--help[Print help]' \
'-V[Print version]' \
'--version[Print version]' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_rledger__subcmd__config__subcmd__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:rledger-config-help-command-$line[1]:"
        case $line[1] in
            (show)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(path)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(edit)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(init)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(aliases)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
;;
(add)
_arguments "${_arguments_options[@]}" : \
'-d+[Transaction date (YYYY-MM-DD, "today", "yesterday", "+1", "-1")]:DATE:_default' \
'--date=[Transaction date (YYYY-MM-DD, "today", "yesterday", "+1", "-1")]:DATE:_default' \
'*-q+[Quick mode\: payee narration account amount \\\[account \\\[amount\\\]\\\]...]:ARGS:_default:ARGS:_default:ARGS:_default:ARGS:_default' \
'*--quick=[Quick mode\: payee narration account amount \\\[account \\\[amount\\\]\\\]...]:ARGS:_default:ARGS:_default:ARGS:_default:ARGS:_default' \
'-P+[Use a specific profile from config]:PROFILE:_default' \
'--profile=[Use a specific profile from config]:PROFILE:_default' \
'-n[Print transaction without appending]' \
'--dry-run[Print transaction without appending]' \
'-y[Skip confirmation prompt]' \
'--yes[Skip confirmation prompt]' \
'--no-completion[Disable account tab completion]' \
'-h[Print help]' \
'--help[Print help]' \
'-V[Print version]' \
'--version[Print version]' \
'::file -- File to append transaction to:_files' \
&& ret=0
;;
(compat)
_arguments "${_arguments_options[@]}" : \
'-P+[Use a specific profile from config]:PROFILE:_default' \
'--profile=[Use a specific profile from config]:PROFILE:_default' \
'-h[Print help]' \
'--help[Print help]' \
'-V[Print version]' \
'--version[Print version]' \
":: :_rledger__subcmd__compat_commands" \
"*::: :->compat" \
&& ret=0

    case $state in
    (compat)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:rledger-compat-command-$line[1]:"
        case $line[1] in
            (install)
_arguments "${_arguments_options[@]}" : \
'--prefix=[Directory to install wrappers into (default\: same as rledger binary)]:PREFIX:_files' \
'-P+[Use a specific profile from config]:PROFILE:_default' \
'--profile=[Use a specific profile from config]:PROFILE:_default' \
'-h[Print help]' \
'--help[Print help]' \
'-V[Print version]' \
'--version[Print version]' \
&& ret=0
;;
(uninstall)
_arguments "${_arguments_options[@]}" : \
'--prefix=[Directory to remove wrappers from (default\: same as rledger binary)]:PREFIX:_files' \
'-P+[Use a specific profile from config]:PROFILE:_default' \
'--profile=[Use a specific profile from config]:PROFILE:_default' \
'-h[Print help]' \
'--help[Print help]' \
'-V[Print version]' \
'--version[Print version]' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_rledger__subcmd__compat__subcmd__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:rledger-compat-help-command-$line[1]:"
        case $line[1] in
            (install)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(uninstall)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
;;
(completions)
_arguments "${_arguments_options[@]}" : \
'-P+[Use a specific profile from config]:PROFILE:_default' \
'--profile=[Use a specific profile from config]:PROFILE:_default' \
'-h[Print help]' \
'--help[Print help]' \
'-V[Print version]' \
'--version[Print version]' \
':shell -- Shell to generate completions for:(bash elvish fish powershell zsh)' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_rledger__subcmd__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:rledger-help-command-$line[1]:"
        case $line[1] in
            (check)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(query)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(format)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(report)
_arguments "${_arguments_options[@]}" : \
":: :_rledger__subcmd__help__subcmd__report_commands" \
"*::: :->report" \
&& ret=0

    case $state in
    (report)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:rledger-help-report-command-$line[1]:"
        case $line[1] in
            (balances)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(balsheet)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(income)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(journal)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(holdings)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(networth)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(accounts)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(commodities)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(stats)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(prices)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
(doctor)
_arguments "${_arguments_options[@]}" : \
":: :_rledger__subcmd__help__subcmd__doctor_commands" \
"*::: :->doctor" \
&& ret=0

    case $state in
    (doctor)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:rledger-help-doctor-command-$line[1]:"
        case $line[1] in
            (lex)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(parse)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(context)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(linked)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(missing-open)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(list-options)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(print-options)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(stats)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(display-context)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(roundtrip)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(directories)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(region)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(generate-synthetic)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
(extract)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(price)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(config)
_arguments "${_arguments_options[@]}" : \
":: :_rledger__subcmd__help__subcmd__config_commands" \
"*::: :->config" \
&& ret=0

    case $state in
    (config)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:rledger-help-config-command-$line[1]:"
        case $line[1] in
            (show)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(path)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(edit)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(init)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(aliases)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
(add)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(compat)
_arguments "${_arguments_options[@]}" : \
":: :_rledger__subcmd__help__subcmd__compat_commands" \
"*::: :->compat" \
&& ret=0

    case $state in
    (compat)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:rledger-help-compat-command-$line[1]:"
        case $line[1] in
            (install)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(uninstall)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
(completions)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
}

(( $+functions[_rledger_commands] )) ||
_rledger_commands() {
    local commands; commands=(
'check:Validate beancount files' \
'query:Query beancount files with BQL' \
'format:Format beancount files' \
'report:Generate financial reports' \
'doctor:Debugging and diagnostic tools' \
'extract:Extract transactions from bank files' \
'price:Fetch commodity prices' \
'config:Manage configuration' \
'add:Add transactions to beancount files' \
'compat:Install or uninstall bean-* compatibility wrapper scripts' \
'completions:Generate shell completions' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'rledger commands' commands "$@"
}
(( $+functions[_rledger__subcmd__add_commands] )) ||
_rledger__subcmd__add_commands() {
    local commands; commands=()
    _describe -t commands 'rledger add commands' commands "$@"
}
(( $+functions[_rledger__subcmd__check_commands] )) ||
_rledger__subcmd__check_commands() {
    local commands; commands=()
    _describe -t commands 'rledger check commands' commands "$@"
}
(( $+functions[_rledger__subcmd__compat_commands] )) ||
_rledger__subcmd__compat_commands() {
    local commands; commands=(
'install:Install bean-* wrapper scripts (bean-check, bean-query, etc.)' \
'uninstall:Remove bean-* wrapper scripts' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'rledger compat commands' commands "$@"
}
(( $+functions[_rledger__subcmd__compat__subcmd__help_commands] )) ||
_rledger__subcmd__compat__subcmd__help_commands() {
    local commands; commands=(
'install:Install bean-* wrapper scripts (bean-check, bean-query, etc.)' \
'uninstall:Remove bean-* wrapper scripts' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'rledger compat help commands' commands "$@"
}
(( $+functions[_rledger__subcmd__compat__subcmd__help__subcmd__help_commands] )) ||
_rledger__subcmd__compat__subcmd__help__subcmd__help_commands() {
    local commands; commands=()
    _describe -t commands 'rledger compat help help commands' commands "$@"
}
(( $+functions[_rledger__subcmd__compat__subcmd__help__subcmd__install_commands] )) ||
_rledger__subcmd__compat__subcmd__help__subcmd__install_commands() {
    local commands; commands=()
    _describe -t commands 'rledger compat help install commands' commands "$@"
}
(( $+functions[_rledger__subcmd__compat__subcmd__help__subcmd__uninstall_commands] )) ||
_rledger__subcmd__compat__subcmd__help__subcmd__uninstall_commands() {
    local commands; commands=()
    _describe -t commands 'rledger compat help uninstall commands' commands "$@"
}
(( $+functions[_rledger__subcmd__compat__subcmd__install_commands] )) ||
_rledger__subcmd__compat__subcmd__install_commands() {
    local commands; commands=()
    _describe -t commands 'rledger compat install commands' commands "$@"
}
(( $+functions[_rledger__subcmd__compat__subcmd__uninstall_commands] )) ||
_rledger__subcmd__compat__subcmd__uninstall_commands() {
    local commands; commands=()
    _describe -t commands 'rledger compat uninstall commands' commands "$@"
}
(( $+functions[_rledger__subcmd__completions_commands] )) ||
_rledger__subcmd__completions_commands() {
    local commands; commands=()
    _describe -t commands 'rledger completions commands' commands "$@"
}
(( $+functions[_rledger__subcmd__config_commands] )) ||
_rledger__subcmd__config_commands() {
    local commands; commands=(
'show:Show the merged configuration from all sources' \
'path:Show config file search paths' \
'edit:Open config file in editor' \
'init:Generate a default config file' \
'aliases:List configured aliases' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'rledger config commands' commands "$@"
}
(( $+functions[_rledger__subcmd__config__subcmd__aliases_commands] )) ||
_rledger__subcmd__config__subcmd__aliases_commands() {
    local commands; commands=()
    _describe -t commands 'rledger config aliases commands' commands "$@"
}
(( $+functions[_rledger__subcmd__config__subcmd__edit_commands] )) ||
_rledger__subcmd__config__subcmd__edit_commands() {
    local commands; commands=()
    _describe -t commands 'rledger config edit commands' commands "$@"
}
(( $+functions[_rledger__subcmd__config__subcmd__help_commands] )) ||
_rledger__subcmd__config__subcmd__help_commands() {
    local commands; commands=(
'show:Show the merged configuration from all sources' \
'path:Show config file search paths' \
'edit:Open config file in editor' \
'init:Generate a default config file' \
'aliases:List configured aliases' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'rledger config help commands' commands "$@"
}
(( $+functions[_rledger__subcmd__config__subcmd__help__subcmd__aliases_commands] )) ||
_rledger__subcmd__config__subcmd__help__subcmd__aliases_commands() {
    local commands; commands=()
    _describe -t commands 'rledger config help aliases commands' commands "$@"
}
(( $+functions[_rledger__subcmd__config__subcmd__help__subcmd__edit_commands] )) ||
_rledger__subcmd__config__subcmd__help__subcmd__edit_commands() {
    local commands; commands=()
    _describe -t commands 'rledger config help edit commands' commands "$@"
}
(( $+functions[_rledger__subcmd__config__subcmd__help__subcmd__help_commands] )) ||
_rledger__subcmd__config__subcmd__help__subcmd__help_commands() {
    local commands; commands=()
    _describe -t commands 'rledger config help help commands' commands "$@"
}
(( $+functions[_rledger__subcmd__config__subcmd__help__subcmd__init_commands] )) ||
_rledger__subcmd__config__subcmd__help__subcmd__init_commands() {
    local commands; commands=()
    _describe -t commands 'rledger config help init commands' commands "$@"
}
(( $+functions[_rledger__subcmd__config__subcmd__help__subcmd__path_commands] )) ||
_rledger__subcmd__config__subcmd__help__subcmd__path_commands() {
    local commands; commands=()
    _describe -t commands 'rledger config help path commands' commands "$@"
}
(( $+functions[_rledger__subcmd__config__subcmd__help__subcmd__show_commands] )) ||
_rledger__subcmd__config__subcmd__help__subcmd__show_commands() {
    local commands; commands=()
    _describe -t commands 'rledger config help show commands' commands "$@"
}
(( $+functions[_rledger__subcmd__config__subcmd__init_commands] )) ||
_rledger__subcmd__config__subcmd__init_commands() {
    local commands; commands=()
    _describe -t commands 'rledger config init commands' commands "$@"
}
(( $+functions[_rledger__subcmd__config__subcmd__path_commands] )) ||
_rledger__subcmd__config__subcmd__path_commands() {
    local commands; commands=()
    _describe -t commands 'rledger config path commands' commands "$@"
}
(( $+functions[_rledger__subcmd__config__subcmd__show_commands] )) ||
_rledger__subcmd__config__subcmd__show_commands() {
    local commands; commands=()
    _describe -t commands 'rledger config show commands' commands "$@"
}
(( $+functions[_rledger__subcmd__doctor_commands] )) ||
_rledger__subcmd__doctor_commands() {
    local commands; commands=(
'lex:Dump the lexer output for a beancount file' \
'parse:Parse a ledger and show parsed directives' \
'context:Show transaction context at a location' \
'linked:Find transactions linked by a link or at a location' \
'missing-open:Print Open directives missing in a file' \
'list-options:List available beancount options' \
'print-options:Print options parsed from a ledger' \
'stats:Display statistics about a ledger' \
'display-context:Display the decimal precision context inferred from the file' \
'roundtrip:Round-trip test on arbitrary ledger' \
'directories:Validate a directory hierarchy against the ledger'\''s account names' \
'region:Print transactions in a line range with balances' \
'generate-synthetic:Generate synthetic beancount files for testing' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'rledger doctor commands' commands "$@"
}
(( $+functions[_rledger__subcmd__doctor__subcmd__context_commands] )) ||
_rledger__subcmd__doctor__subcmd__context_commands() {
    local commands; commands=()
    _describe -t commands 'rledger doctor context commands' commands "$@"
}
(( $+functions[_rledger__subcmd__doctor__subcmd__directories_commands] )) ||
_rledger__subcmd__doctor__subcmd__directories_commands() {
    local commands; commands=()
    _describe -t commands 'rledger doctor directories commands' commands "$@"
}
(( $+functions[_rledger__subcmd__doctor__subcmd__display-context_commands] )) ||
_rledger__subcmd__doctor__subcmd__display-context_commands() {
    local commands; commands=()
    _describe -t commands 'rledger doctor display-context commands' commands "$@"
}
(( $+functions[_rledger__subcmd__doctor__subcmd__generate-synthetic_commands] )) ||
_rledger__subcmd__doctor__subcmd__generate-synthetic_commands() {
    local commands; commands=()
    _describe -t commands 'rledger doctor generate-synthetic commands' commands "$@"
}
(( $+functions[_rledger__subcmd__doctor__subcmd__help_commands] )) ||
_rledger__subcmd__doctor__subcmd__help_commands() {
    local commands; commands=(
'lex:Dump the lexer output for a beancount file' \
'parse:Parse a ledger and show parsed directives' \
'context:Show transaction context at a location' \
'linked:Find transactions linked by a link or at a location' \
'missing-open:Print Open directives missing in a file' \
'list-options:List available beancount options' \
'print-options:Print options parsed from a ledger' \
'stats:Display statistics about a ledger' \
'display-context:Display the decimal precision context inferred from the file' \
'roundtrip:Round-trip test on arbitrary ledger' \
'directories:Validate a directory hierarchy against the ledger'\''s account names' \
'region:Print transactions in a line range with balances' \
'generate-synthetic:Generate synthetic beancount files for testing' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'rledger doctor help commands' commands "$@"
}
(( $+functions[_rledger__subcmd__doctor__subcmd__help__subcmd__context_commands] )) ||
_rledger__subcmd__doctor__subcmd__help__subcmd__context_commands() {
    local commands; commands=()
    _describe -t commands 'rledger doctor help context commands' commands "$@"
}
(( $+functions[_rledger__subcmd__doctor__subcmd__help__subcmd__directories_commands] )) ||
_rledger__subcmd__doctor__subcmd__help__subcmd__directories_commands() {
    local commands; commands=()
    _describe -t commands 'rledger doctor help directories commands' commands "$@"
}
(( $+functions[_rledger__subcmd__doctor__subcmd__help__subcmd__display-context_commands] )) ||
_rledger__subcmd__doctor__subcmd__help__subcmd__display-context_commands() {
    local commands; commands=()
    _describe -t commands 'rledger doctor help display-context commands' commands "$@"
}
(( $+functions[_rledger__subcmd__doctor__subcmd__help__subcmd__generate-synthetic_commands] )) ||
_rledger__subcmd__doctor__subcmd__help__subcmd__generate-synthetic_commands() {
    local commands; commands=()
    _describe -t commands 'rledger doctor help generate-synthetic commands' commands "$@"
}
(( $+functions[_rledger__subcmd__doctor__subcmd__help__subcmd__help_commands] )) ||
_rledger__subcmd__doctor__subcmd__help__subcmd__help_commands() {
    local commands; commands=()
    _describe -t commands 'rledger doctor help help commands' commands "$@"
}
(( $+functions[_rledger__subcmd__doctor__subcmd__help__subcmd__lex_commands] )) ||
_rledger__subcmd__doctor__subcmd__help__subcmd__lex_commands() {
    local commands; commands=()
    _describe -t commands 'rledger doctor help lex commands' commands "$@"
}
(( $+functions[_rledger__subcmd__doctor__subcmd__help__subcmd__linked_commands] )) ||
_rledger__subcmd__doctor__subcmd__help__subcmd__linked_commands() {
    local commands; commands=()
    _describe -t commands 'rledger doctor help linked commands' commands "$@"
}
(( $+functions[_rledger__subcmd__doctor__subcmd__help__subcmd__list-options_commands] )) ||
_rledger__subcmd__doctor__subcmd__help__subcmd__list-options_commands() {
    local commands; commands=()
    _describe -t commands 'rledger doctor help list-options commands' commands "$@"
}
(( $+functions[_rledger__subcmd__doctor__subcmd__help__subcmd__missing-open_commands] )) ||
_rledger__subcmd__doctor__subcmd__help__subcmd__missing-open_commands() {
    local commands; commands=()
    _describe -t commands 'rledger doctor help missing-open commands' commands "$@"
}
(( $+functions[_rledger__subcmd__doctor__subcmd__help__subcmd__parse_commands] )) ||
_rledger__subcmd__doctor__subcmd__help__subcmd__parse_commands() {
    local commands; commands=()
    _describe -t commands 'rledger doctor help parse commands' commands "$@"
}
(( $+functions[_rledger__subcmd__doctor__subcmd__help__subcmd__print-options_commands] )) ||
_rledger__subcmd__doctor__subcmd__help__subcmd__print-options_commands() {
    local commands; commands=()
    _describe -t commands 'rledger doctor help print-options commands' commands "$@"
}
(( $+functions[_rledger__subcmd__doctor__subcmd__help__subcmd__region_commands] )) ||
_rledger__subcmd__doctor__subcmd__help__subcmd__region_commands() {
    local commands; commands=()
    _describe -t commands 'rledger doctor help region commands' commands "$@"
}
(( $+functions[_rledger__subcmd__doctor__subcmd__help__subcmd__roundtrip_commands] )) ||
_rledger__subcmd__doctor__subcmd__help__subcmd__roundtrip_commands() {
    local commands; commands=()
    _describe -t commands 'rledger doctor help roundtrip commands' commands "$@"
}
(( $+functions[_rledger__subcmd__doctor__subcmd__help__subcmd__stats_commands] )) ||
_rledger__subcmd__doctor__subcmd__help__subcmd__stats_commands() {
    local commands; commands=()
    _describe -t commands 'rledger doctor help stats commands' commands "$@"
}
(( $+functions[_rledger__subcmd__doctor__subcmd__lex_commands] )) ||
_rledger__subcmd__doctor__subcmd__lex_commands() {
    local commands; commands=()
    _describe -t commands 'rledger doctor lex commands' commands "$@"
}
(( $+functions[_rledger__subcmd__doctor__subcmd__linked_commands] )) ||
_rledger__subcmd__doctor__subcmd__linked_commands() {
    local commands; commands=()
    _describe -t commands 'rledger doctor linked commands' commands "$@"
}
(( $+functions[_rledger__subcmd__doctor__subcmd__list-options_commands] )) ||
_rledger__subcmd__doctor__subcmd__list-options_commands() {
    local commands; commands=()
    _describe -t commands 'rledger doctor list-options commands' commands "$@"
}
(( $+functions[_rledger__subcmd__doctor__subcmd__missing-open_commands] )) ||
_rledger__subcmd__doctor__subcmd__missing-open_commands() {
    local commands; commands=()
    _describe -t commands 'rledger doctor missing-open commands' commands "$@"
}
(( $+functions[_rledger__subcmd__doctor__subcmd__parse_commands] )) ||
_rledger__subcmd__doctor__subcmd__parse_commands() {
    local commands; commands=()
    _describe -t commands 'rledger doctor parse commands' commands "$@"
}
(( $+functions[_rledger__subcmd__doctor__subcmd__print-options_commands] )) ||
_rledger__subcmd__doctor__subcmd__print-options_commands() {
    local commands; commands=()
    _describe -t commands 'rledger doctor print-options commands' commands "$@"
}
(( $+functions[_rledger__subcmd__doctor__subcmd__region_commands] )) ||
_rledger__subcmd__doctor__subcmd__region_commands() {
    local commands; commands=()
    _describe -t commands 'rledger doctor region commands' commands "$@"
}
(( $+functions[_rledger__subcmd__doctor__subcmd__roundtrip_commands] )) ||
_rledger__subcmd__doctor__subcmd__roundtrip_commands() {
    local commands; commands=()
    _describe -t commands 'rledger doctor roundtrip commands' commands "$@"
}
(( $+functions[_rledger__subcmd__doctor__subcmd__stats_commands] )) ||
_rledger__subcmd__doctor__subcmd__stats_commands() {
    local commands; commands=()
    _describe -t commands 'rledger doctor stats commands' commands "$@"
}
(( $+functions[_rledger__subcmd__extract_commands] )) ||
_rledger__subcmd__extract_commands() {
    local commands; commands=()
    _describe -t commands 'rledger extract commands' commands "$@"
}
(( $+functions[_rledger__subcmd__format_commands] )) ||
_rledger__subcmd__format_commands() {
    local commands; commands=()
    _describe -t commands 'rledger format commands' commands "$@"
}
(( $+functions[_rledger__subcmd__help_commands] )) ||
_rledger__subcmd__help_commands() {
    local commands; commands=(
'check:Validate beancount files' \
'query:Query beancount files with BQL' \
'format:Format beancount files' \
'report:Generate financial reports' \
'doctor:Debugging and diagnostic tools' \
'extract:Extract transactions from bank files' \
'price:Fetch commodity prices' \
'config:Manage configuration' \
'add:Add transactions to beancount files' \
'compat:Install or uninstall bean-* compatibility wrapper scripts' \
'completions:Generate shell completions' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'rledger help commands' commands "$@"
}
(( $+functions[_rledger__subcmd__help__subcmd__add_commands] )) ||
_rledger__subcmd__help__subcmd__add_commands() {
    local commands; commands=()
    _describe -t commands 'rledger help add commands' commands "$@"
}
(( $+functions[_rledger__subcmd__help__subcmd__check_commands] )) ||
_rledger__subcmd__help__subcmd__check_commands() {
    local commands; commands=()
    _describe -t commands 'rledger help check commands' commands "$@"
}
(( $+functions[_rledger__subcmd__help__subcmd__compat_commands] )) ||
_rledger__subcmd__help__subcmd__compat_commands() {
    local commands; commands=(
'install:Install bean-* wrapper scripts (bean-check, bean-query, etc.)' \
'uninstall:Remove bean-* wrapper scripts' \
    )
    _describe -t commands 'rledger help compat commands' commands "$@"
}
(( $+functions[_rledger__subcmd__help__subcmd__compat__subcmd__install_commands] )) ||
_rledger__subcmd__help__subcmd__compat__subcmd__install_commands() {
    local commands; commands=()
    _describe -t commands 'rledger help compat install commands' commands "$@"
}
(( $+functions[_rledger__subcmd__help__subcmd__compat__subcmd__uninstall_commands] )) ||
_rledger__subcmd__help__subcmd__compat__subcmd__uninstall_commands() {
    local commands; commands=()
    _describe -t commands 'rledger help compat uninstall commands' commands "$@"
}
(( $+functions[_rledger__subcmd__help__subcmd__completions_commands] )) ||
_rledger__subcmd__help__subcmd__completions_commands() {
    local commands; commands=()
    _describe -t commands 'rledger help completions commands' commands "$@"
}
(( $+functions[_rledger__subcmd__help__subcmd__config_commands] )) ||
_rledger__subcmd__help__subcmd__config_commands() {
    local commands; commands=(
'show:Show the merged configuration from all sources' \
'path:Show config file search paths' \
'edit:Open config file in editor' \
'init:Generate a default config file' \
'aliases:List configured aliases' \
    )
    _describe -t commands 'rledger help config commands' commands "$@"
}
(( $+functions[_rledger__subcmd__help__subcmd__config__subcmd__aliases_commands] )) ||
_rledger__subcmd__help__subcmd__config__subcmd__aliases_commands() {
    local commands; commands=()
    _describe -t commands 'rledger help config aliases commands' commands "$@"
}
(( $+functions[_rledger__subcmd__help__subcmd__config__subcmd__edit_commands] )) ||
_rledger__subcmd__help__subcmd__config__subcmd__edit_commands() {
    local commands; commands=()
    _describe -t commands 'rledger help config edit commands' commands "$@"
}
(( $+functions[_rledger__subcmd__help__subcmd__config__subcmd__init_commands] )) ||
_rledger__subcmd__help__subcmd__config__subcmd__init_commands() {
    local commands; commands=()
    _describe -t commands 'rledger help config init commands' commands "$@"
}
(( $+functions[_rledger__subcmd__help__subcmd__config__subcmd__path_commands] )) ||
_rledger__subcmd__help__subcmd__config__subcmd__path_commands() {
    local commands; commands=()
    _describe -t commands 'rledger help config path commands' commands "$@"
}
(( $+functions[_rledger__subcmd__help__subcmd__config__subcmd__show_commands] )) ||
_rledger__subcmd__help__subcmd__config__subcmd__show_commands() {
    local commands; commands=()
    _describe -t commands 'rledger help config show commands' commands "$@"
}
(( $+functions[_rledger__subcmd__help__subcmd__doctor_commands] )) ||
_rledger__subcmd__help__subcmd__doctor_commands() {
    local commands; commands=(
'lex:Dump the lexer output for a beancount file' \
'parse:Parse a ledger and show parsed directives' \
'context:Show transaction context at a location' \
'linked:Find transactions linked by a link or at a location' \
'missing-open:Print Open directives missing in a file' \
'list-options:List available beancount options' \
'print-options:Print options parsed from a ledger' \
'stats:Display statistics about a ledger' \
'display-context:Display the decimal precision context inferred from the file' \
'roundtrip:Round-trip test on arbitrary ledger' \
'directories:Validate a directory hierarchy against the ledger'\''s account names' \
'region:Print transactions in a line range with balances' \
'generate-synthetic:Generate synthetic beancount files for testing' \
    )
    _describe -t commands 'rledger help doctor commands' commands "$@"
}
(( $+functions[_rledger__subcmd__help__subcmd__doctor__subcmd__context_commands] )) ||
_rledger__subcmd__help__subcmd__doctor__subcmd__context_commands() {
    local commands; commands=()
    _describe -t commands 'rledger help doctor context commands' commands "$@"
}
(( $+functions[_rledger__subcmd__help__subcmd__doctor__subcmd__directories_commands] )) ||
_rledger__subcmd__help__subcmd__doctor__subcmd__directories_commands() {
    local commands; commands=()
    _describe -t commands 'rledger help doctor directories commands' commands "$@"
}
(( $+functions[_rledger__subcmd__help__subcmd__doctor__subcmd__display-context_commands] )) ||
_rledger__subcmd__help__subcmd__doctor__subcmd__display-context_commands() {
    local commands; commands=()
    _describe -t commands 'rledger help doctor display-context commands' commands "$@"
}
(( $+functions[_rledger__subcmd__help__subcmd__doctor__subcmd__generate-synthetic_commands] )) ||
_rledger__subcmd__help__subcmd__doctor__subcmd__generate-synthetic_commands() {
    local commands; commands=()
    _describe -t commands 'rledger help doctor generate-synthetic commands' commands "$@"
}
(( $+functions[_rledger__subcmd__help__subcmd__doctor__subcmd__lex_commands] )) ||
_rledger__subcmd__help__subcmd__doctor__subcmd__lex_commands() {
    local commands; commands=()
    _describe -t commands 'rledger help doctor lex commands' commands "$@"
}
(( $+functions[_rledger__subcmd__help__subcmd__doctor__subcmd__linked_commands] )) ||
_rledger__subcmd__help__subcmd__doctor__subcmd__linked_commands() {
    local commands; commands=()
    _describe -t commands 'rledger help doctor linked commands' commands "$@"
}
(( $+functions[_rledger__subcmd__help__subcmd__doctor__subcmd__list-options_commands] )) ||
_rledger__subcmd__help__subcmd__doctor__subcmd__list-options_commands() {
    local commands; commands=()
    _describe -t commands 'rledger help doctor list-options commands' commands "$@"
}
(( $+functions[_rledger__subcmd__help__subcmd__doctor__subcmd__missing-open_commands] )) ||
_rledger__subcmd__help__subcmd__doctor__subcmd__missing-open_commands() {
    local commands; commands=()
    _describe -t commands 'rledger help doctor missing-open commands' commands "$@"
}
(( $+functions[_rledger__subcmd__help__subcmd__doctor__subcmd__parse_commands] )) ||
_rledger__subcmd__help__subcmd__doctor__subcmd__parse_commands() {
    local commands; commands=()
    _describe -t commands 'rledger help doctor parse commands' commands "$@"
}
(( $+functions[_rledger__subcmd__help__subcmd__doctor__subcmd__print-options_commands] )) ||
_rledger__subcmd__help__subcmd__doctor__subcmd__print-options_commands() {
    local commands; commands=()
    _describe -t commands 'rledger help doctor print-options commands' commands "$@"
}
(( $+functions[_rledger__subcmd__help__subcmd__doctor__subcmd__region_commands] )) ||
_rledger__subcmd__help__subcmd__doctor__subcmd__region_commands() {
    local commands; commands=()
    _describe -t commands 'rledger help doctor region commands' commands "$@"
}
(( $+functions[_rledger__subcmd__help__subcmd__doctor__subcmd__roundtrip_commands] )) ||
_rledger__subcmd__help__subcmd__doctor__subcmd__roundtrip_commands() {
    local commands; commands=()
    _describe -t commands 'rledger help doctor roundtrip commands' commands "$@"
}
(( $+functions[_rledger__subcmd__help__subcmd__doctor__subcmd__stats_commands] )) ||
_rledger__subcmd__help__subcmd__doctor__subcmd__stats_commands() {
    local commands; commands=()
    _describe -t commands 'rledger help doctor stats commands' commands "$@"
}
(( $+functions[_rledger__subcmd__help__subcmd__extract_commands] )) ||
_rledger__subcmd__help__subcmd__extract_commands() {
    local commands; commands=()
    _describe -t commands 'rledger help extract commands' commands "$@"
}
(( $+functions[_rledger__subcmd__help__subcmd__format_commands] )) ||
_rledger__subcmd__help__subcmd__format_commands() {
    local commands; commands=()
    _describe -t commands 'rledger help format commands' commands "$@"
}
(( $+functions[_rledger__subcmd__help__subcmd__help_commands] )) ||
_rledger__subcmd__help__subcmd__help_commands() {
    local commands; commands=()
    _describe -t commands 'rledger help help commands' commands "$@"
}
(( $+functions[_rledger__subcmd__help__subcmd__price_commands] )) ||
_rledger__subcmd__help__subcmd__price_commands() {
    local commands; commands=()
    _describe -t commands 'rledger help price commands' commands "$@"
}
(( $+functions[_rledger__subcmd__help__subcmd__query_commands] )) ||
_rledger__subcmd__help__subcmd__query_commands() {
    local commands; commands=()
    _describe -t commands 'rledger help query commands' commands "$@"
}
(( $+functions[_rledger__subcmd__help__subcmd__report_commands] )) ||
_rledger__subcmd__help__subcmd__report_commands() {
    local commands; commands=(
'balances:Show account balances' \
'balsheet:Balance sheet (Assets, Liabilities, Equity)' \
'income:Income statement (Income and Expenses)' \
'journal:Transaction journal/register' \
'holdings:Investment holdings with cost basis' \
'networth:Net worth over time' \
'accounts:List all accounts' \
'commodities:List all commodities/currencies' \
'stats:Show ledger statistics' \
'prices:Show price entries' \
    )
    _describe -t commands 'rledger help report commands' commands "$@"
}
(( $+functions[_rledger__subcmd__help__subcmd__report__subcmd__accounts_commands] )) ||
_rledger__subcmd__help__subcmd__report__subcmd__accounts_commands() {
    local commands; commands=()
    _describe -t commands 'rledger help report accounts commands' commands "$@"
}
(( $+functions[_rledger__subcmd__help__subcmd__report__subcmd__balances_commands] )) ||
_rledger__subcmd__help__subcmd__report__subcmd__balances_commands() {
    local commands; commands=()
    _describe -t commands 'rledger help report balances commands' commands "$@"
}
(( $+functions[_rledger__subcmd__help__subcmd__report__subcmd__balsheet_commands] )) ||
_rledger__subcmd__help__subcmd__report__subcmd__balsheet_commands() {
    local commands; commands=()
    _describe -t commands 'rledger help report balsheet commands' commands "$@"
}
(( $+functions[_rledger__subcmd__help__subcmd__report__subcmd__commodities_commands] )) ||
_rledger__subcmd__help__subcmd__report__subcmd__commodities_commands() {
    local commands; commands=()
    _describe -t commands 'rledger help report commodities commands' commands "$@"
}
(( $+functions[_rledger__subcmd__help__subcmd__report__subcmd__holdings_commands] )) ||
_rledger__subcmd__help__subcmd__report__subcmd__holdings_commands() {
    local commands; commands=()
    _describe -t commands 'rledger help report holdings commands' commands "$@"
}
(( $+functions[_rledger__subcmd__help__subcmd__report__subcmd__income_commands] )) ||
_rledger__subcmd__help__subcmd__report__subcmd__income_commands() {
    local commands; commands=()
    _describe -t commands 'rledger help report income commands' commands "$@"
}
(( $+functions[_rledger__subcmd__help__subcmd__report__subcmd__journal_commands] )) ||
_rledger__subcmd__help__subcmd__report__subcmd__journal_commands() {
    local commands; commands=()
    _describe -t commands 'rledger help report journal commands' commands "$@"
}
(( $+functions[_rledger__subcmd__help__subcmd__report__subcmd__networth_commands] )) ||
_rledger__subcmd__help__subcmd__report__subcmd__networth_commands() {
    local commands; commands=()
    _describe -t commands 'rledger help report networth commands' commands "$@"
}
(( $+functions[_rledger__subcmd__help__subcmd__report__subcmd__prices_commands] )) ||
_rledger__subcmd__help__subcmd__report__subcmd__prices_commands() {
    local commands; commands=()
    _describe -t commands 'rledger help report prices commands' commands "$@"
}
(( $+functions[_rledger__subcmd__help__subcmd__report__subcmd__stats_commands] )) ||
_rledger__subcmd__help__subcmd__report__subcmd__stats_commands() {
    local commands; commands=()
    _describe -t commands 'rledger help report stats commands' commands "$@"
}
(( $+functions[_rledger__subcmd__price_commands] )) ||
_rledger__subcmd__price_commands() {
    local commands; commands=()
    _describe -t commands 'rledger price commands' commands "$@"
}
(( $+functions[_rledger__subcmd__query_commands] )) ||
_rledger__subcmd__query_commands() {
    local commands; commands=()
    _describe -t commands 'rledger query commands' commands "$@"
}
(( $+functions[_rledger__subcmd__report_commands] )) ||
_rledger__subcmd__report_commands() {
    local commands; commands=(
'balances:Show account balances' \
'balsheet:Balance sheet (Assets, Liabilities, Equity)' \
'income:Income statement (Income and Expenses)' \
'journal:Transaction journal/register' \
'holdings:Investment holdings with cost basis' \
'networth:Net worth over time' \
'accounts:List all accounts' \
'commodities:List all commodities/currencies' \
'stats:Show ledger statistics' \
'prices:Show price entries' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'rledger report commands' commands "$@"
}
(( $+functions[_rledger__subcmd__report__subcmd__accounts_commands] )) ||
_rledger__subcmd__report__subcmd__accounts_commands() {
    local commands; commands=()
    _describe -t commands 'rledger report accounts commands' commands "$@"
}
(( $+functions[_rledger__subcmd__report__subcmd__balances_commands] )) ||
_rledger__subcmd__report__subcmd__balances_commands() {
    local commands; commands=()
    _describe -t commands 'rledger report balances commands' commands "$@"
}
(( $+functions[_rledger__subcmd__report__subcmd__balsheet_commands] )) ||
_rledger__subcmd__report__subcmd__balsheet_commands() {
    local commands; commands=()
    _describe -t commands 'rledger report balsheet commands' commands "$@"
}
(( $+functions[_rledger__subcmd__report__subcmd__commodities_commands] )) ||
_rledger__subcmd__report__subcmd__commodities_commands() {
    local commands; commands=()
    _describe -t commands 'rledger report commodities commands' commands "$@"
}
(( $+functions[_rledger__subcmd__report__subcmd__help_commands] )) ||
_rledger__subcmd__report__subcmd__help_commands() {
    local commands; commands=(
'balances:Show account balances' \
'balsheet:Balance sheet (Assets, Liabilities, Equity)' \
'income:Income statement (Income and Expenses)' \
'journal:Transaction journal/register' \
'holdings:Investment holdings with cost basis' \
'networth:Net worth over time' \
'accounts:List all accounts' \
'commodities:List all commodities/currencies' \
'stats:Show ledger statistics' \
'prices:Show price entries' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'rledger report help commands' commands "$@"
}
(( $+functions[_rledger__subcmd__report__subcmd__help__subcmd__accounts_commands] )) ||
_rledger__subcmd__report__subcmd__help__subcmd__accounts_commands() {
    local commands; commands=()
    _describe -t commands 'rledger report help accounts commands' commands "$@"
}
(( $+functions[_rledger__subcmd__report__subcmd__help__subcmd__balances_commands] )) ||
_rledger__subcmd__report__subcmd__help__subcmd__balances_commands() {
    local commands; commands=()
    _describe -t commands 'rledger report help balances commands' commands "$@"
}
(( $+functions[_rledger__subcmd__report__subcmd__help__subcmd__balsheet_commands] )) ||
_rledger__subcmd__report__subcmd__help__subcmd__balsheet_commands() {
    local commands; commands=()
    _describe -t commands 'rledger report help balsheet commands' commands "$@"
}
(( $+functions[_rledger__subcmd__report__subcmd__help__subcmd__commodities_commands] )) ||
_rledger__subcmd__report__subcmd__help__subcmd__commodities_commands() {
    local commands; commands=()
    _describe -t commands 'rledger report help commodities commands' commands "$@"
}
(( $+functions[_rledger__subcmd__report__subcmd__help__subcmd__help_commands] )) ||
_rledger__subcmd__report__subcmd__help__subcmd__help_commands() {
    local commands; commands=()
    _describe -t commands 'rledger report help help commands' commands "$@"
}
(( $+functions[_rledger__subcmd__report__subcmd__help__subcmd__holdings_commands] )) ||
_rledger__subcmd__report__subcmd__help__subcmd__holdings_commands() {
    local commands; commands=()
    _describe -t commands 'rledger report help holdings commands' commands "$@"
}
(( $+functions[_rledger__subcmd__report__subcmd__help__subcmd__income_commands] )) ||
_rledger__subcmd__report__subcmd__help__subcmd__income_commands() {
    local commands; commands=()
    _describe -t commands 'rledger report help income commands' commands "$@"
}
(( $+functions[_rledger__subcmd__report__subcmd__help__subcmd__journal_commands] )) ||
_rledger__subcmd__report__subcmd__help__subcmd__journal_commands() {
    local commands; commands=()
    _describe -t commands 'rledger report help journal commands' commands "$@"
}
(( $+functions[_rledger__subcmd__report__subcmd__help__subcmd__networth_commands] )) ||
_rledger__subcmd__report__subcmd__help__subcmd__networth_commands() {
    local commands; commands=()
    _describe -t commands 'rledger report help networth commands' commands "$@"
}
(( $+functions[_rledger__subcmd__report__subcmd__help__subcmd__prices_commands] )) ||
_rledger__subcmd__report__subcmd__help__subcmd__prices_commands() {
    local commands; commands=()
    _describe -t commands 'rledger report help prices commands' commands "$@"
}
(( $+functions[_rledger__subcmd__report__subcmd__help__subcmd__stats_commands] )) ||
_rledger__subcmd__report__subcmd__help__subcmd__stats_commands() {
    local commands; commands=()
    _describe -t commands 'rledger report help stats commands' commands "$@"
}
(( $+functions[_rledger__subcmd__report__subcmd__holdings_commands] )) ||
_rledger__subcmd__report__subcmd__holdings_commands() {
    local commands; commands=()
    _describe -t commands 'rledger report holdings commands' commands "$@"
}
(( $+functions[_rledger__subcmd__report__subcmd__income_commands] )) ||
_rledger__subcmd__report__subcmd__income_commands() {
    local commands; commands=()
    _describe -t commands 'rledger report income commands' commands "$@"
}
(( $+functions[_rledger__subcmd__report__subcmd__journal_commands] )) ||
_rledger__subcmd__report__subcmd__journal_commands() {
    local commands; commands=()
    _describe -t commands 'rledger report journal commands' commands "$@"
}
(( $+functions[_rledger__subcmd__report__subcmd__networth_commands] )) ||
_rledger__subcmd__report__subcmd__networth_commands() {
    local commands; commands=()
    _describe -t commands 'rledger report networth commands' commands "$@"
}
(( $+functions[_rledger__subcmd__report__subcmd__prices_commands] )) ||
_rledger__subcmd__report__subcmd__prices_commands() {
    local commands; commands=()
    _describe -t commands 'rledger report prices commands' commands "$@"
}
(( $+functions[_rledger__subcmd__report__subcmd__stats_commands] )) ||
_rledger__subcmd__report__subcmd__stats_commands() {
    local commands; commands=()
    _describe -t commands 'rledger report stats commands' commands "$@"
}

if [ "$funcstack[1]" = "_rledger" ]; then
    _rledger "$@"
else
    compdef _rledger rledger
fi
