
edit:completion:arg-completer[flavours] = [@words]{
    fn spaces [n]{
        repeat $n ' ' | joins ''
    }
    fn cand [text desc]{
        edit:complex-candidate $text &display-suffix=' '(spaces (- 14 (wcswidth $text)))$desc
    }
    command = 'flavours'
    for word $words[1:-1] {
        if (has-prefix $word '-') {
            break
        }
        command = $command';'$word
    }
    completions = [
        &'flavours'= {
            cand -c 'Specify a configuration file (Defaults to ~/.config/flavours/config.toml)'
            cand --config 'Specify a configuration file (Defaults to ~/.config/flavours/config.toml)'
            cand -d 'Specify a data directory (Defaults to ~/.local/share/flavours)'
            cand --directory 'Specify a data directory (Defaults to ~/.local/share/flavours)'
            cand --completions 'Generates completion for given shell, outputs to stdout'
            cand -v 'Be more verbose'
            cand --verbose 'Be more verbose'
            cand -h 'Prints help information'
            cand --help 'Prints help information'
            cand -V 'Prints version information'
            cand --version 'Prints version information'
            cand current 'Prints last applied scheme name'
            cand list 'Prints a list with all matching schemes'
            cand info 'Shows scheme colors for all schemes matching pattern. Optionally uses truecolor'
            cand generate 'Generates a scheme based on an image'
            cand apply 'Applies scheme, according to user configuration'
            cand update 'Downloads schemes, templates, or updates their lists (from repos specified in sources.yml)'
        }
        &'flavours;current'= {
            cand -h 'Prints help information'
            cand --help 'Prints help information'
        }
        &'flavours;list'= {
            cand -l 'Print each scheme on its own line'
            cand --lines 'Print each scheme on its own line'
            cand -h 'Prints help information'
            cand --help 'Prints help information'
        }
        &'flavours;info'= {
            cand -r 'Don''t pretty print the colors.'
            cand --raw 'Don''t pretty print the colors.'
            cand -h 'Prints help information'
            cand --help 'Prints help information'
        }
        &'flavours;generate'= {
            cand -s 'Scheme slug (the name you specify when applying schemes) to output to. If ommited, defaults to ''generated'''
            cand --slug 'Scheme slug (the name you specify when applying schemes) to output to. If ommited, defaults to ''generated'''
            cand -n 'Scheme display name (can include spaces and capitalization) to write, defaults to ''Generated'''
            cand --name 'Scheme display name (can include spaces and capitalization) to write, defaults to ''Generated'''
            cand -a 'Scheme author info (name, email, etc) to write, defaults to ''Flavours'''
            cand --author 'Scheme author info (name, email, etc) to write, defaults to ''Flavours'''
            cand --stdout 'Outputs scheme to stdout instead of writing it to a file.'
            cand -h 'Prints help information'
            cand --help 'Prints help information'
        }
        &'flavours;apply'= {
            cand -h 'Prints help information'
            cand --help 'Prints help information'
        }
        &'flavours;update'= {
            cand -h 'Prints help information'
            cand --help 'Prints help information'
        }
    ]
    $completions[$command]
}
