summaryrefslogtreecommitdiffstats
path: root/completions/just.elvish
blob: 49b19a253154c679af12ec7cc2b519410f22634a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
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 --command-color 'Echo recipe lines in <COMMAND-COLOR>'
            cand --dump-format 'Dump justfile as <FORMAT>'
            cand --list-heading 'Print <TEXT> before list'
            cand --list-prefix 'Print <TEXT> before each list item'
            cand -f 'Use <JUSTFILE> as justfile'
            cand --justfile 'Use <JUSTFILE> as justfile'
            cand --set 'Override <VARIABLE> with <VALUE>'
            cand --shell 'Invoke <SHELL> to run recipes'
            cand --shell-arg 'Invoke shell with <SHELL-ARG> as an argument'
            cand -d 'Use <WORKING-DIRECTORY> as working directory. --justfile must also be set'
            cand --working-directory 'Use <WORKING-DIRECTORY> as working directory. --justfile must also be set'
            cand -c 'Run an arbitrary command with the working directory, `.env`, overrides, and exports set'
            cand --command 'Run an arbitrary command with the working directory, `.env`, overrides, and exports set'
            cand --completions 'Print shell completion script for <SHELL>'
            cand -s 'Show information about <RECIPE>'
            cand --show 'Show information about <RECIPE>'
            cand --dotenv-filename 'Search for environment file named <DOTENV-FILENAME> instead of `.env`'
            cand --dotenv-path 'Load environment file at <DOTENV-PATH> instead of searching for one'
            cand --check 'Run `--fmt` in ''check'' mode. Exits with 0 if justfile is formatted correctly. Exits with 1 and prints a diff if formatting is required.'
            cand --yes 'Automatically confirm all recipes.'
            cand -n 'Print what just would do without doing it'
            cand --dry-run 'Print what just would do without doing it'
            cand --highlight 'Highlight echoed recipe lines in bold'
            cand --no-deps 'Don''t run recipe dependencies'
            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 --shell-command 'Invoke <COMMAND> with the shell used to run recipe lines and backticks'
            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 --unstable 'Enable unstable features'
            cand -v 'Use verbose output'
            cand --verbose 'Use verbose output'
            cand --changelog 'Print changelog'
            cand --choose 'Select one or more recipes to run using a binary chooser. If `--chooser` is not passed the chooser defaults to the value of $JUST_CHOOSER, falling back to `fzf`'
            cand --dump 'Print 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 'Evaluate and print all variables. If a variable name is given as an argument, only print that variable''s value.'
            cand --fmt 'Format and overwrite justfile'
            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]
}