edit:completion:arg-completer[just] = [@words]{ fn spaces [n]{ repeat $n ' ' | joins '' } fn cand [text desc]{ edit:complex-candidate $text &display-suffix=' '(spaces (- 14 (wcswidth $text)))$desc } command = 'just' for word $words[1:-1] { if (has-prefix $word '-') { break } command = $command';'$word } completions = [ &'just'= { cand --chooser 'Override binary invoked by `--choose`' cand --color 'Print colorful output' cand --list-heading 'Print before list' cand --list-prefix 'Print before each list item' cand -f 'Use as justfile' cand --justfile 'Use as justfile' cand --set 'Override with ' cand --shell 'Invoke to run recipes' cand --shell-arg 'Invoke shell with as an argument' cand -d 'Use as working directory. --justfile must also be set' cand --working-directory 'Use as working directory. --justfile must also be set' cand --completions 'Print shell completion script for ' cand -s 'Show information about ' cand --show 'Show information about ' cand --dry-run 'Print what just would do without doing it' cand --highlight 'Highlight echoed recipe lines in bold' cand --no-dotenv 'Don''t load `.env` file' cand --no-highlight 'Don''t highlight echoed recipe lines in bold' cand -q 'Suppress all output' cand --quiet 'Suppress all output' cand --clear-shell-args 'Clear shell arguments' cand -u 'Return list and summary entries in source order' cand --unsorted 'Return list and summary entries in source order' cand -v 'Use verbose output' cand --verbose 'Use verbose output' cand --choose 'Select one or more recipes to run using a binary. If `--chooser` is not passed the chooser defaults to the value of $JUST_CHOOSER, falling back to `fzf`' cand --dump 'Print entire justfile' cand -e 'Edit justfile with editor given by $VISUAL or $EDITOR, falling back to `vim`' cand --edit 'Edit justfile with editor given by $VISUAL or $EDITOR, falling back to `vim`' cand --evaluate 'Print evaluated variables' cand --init 'Initialize new justfile in project root' cand -l 'List available recipes and their arguments' cand --list 'List available recipes and their arguments' cand --summary 'List names of available recipes' cand --variables 'List names of variables' cand -h 'Print help information' cand --help 'Print help information' cand -V 'Print version information' cand --version 'Print version information' } ] $completions[$command] }