all repos — scriptura @ baa93ca20f6525c97091d5ece5861d4526b5591c

a corner in $HOME for your scripts

completions/scriptura.fish (view raw)

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
set --query SCRIPTURA_ROOT or set --local SCRIPTURA_ROOT "~/sd"

set --local subcommands run help edit cat which

complete --command scriptura --erase

complete --command scriptura --no-files

complete --command scriptura \
    --condition __fish_use_subcommand \
    --exclusive \
    --description 'Run a script' \
    --arguments run

complete --command scriptura \
    --condition __fish_use_subcommand \
    --exclusive \
    --description 'Display help information' \
    --arguments help

complete --command scriptura \
    --condition __fish_use_subcommand \
    --exclusive \
    --description 'Create new script' \
    --arguments new

complete --command scriptura \
    --condition __fish_use_subcommand \
    --exclusive \
    --description 'Edit existing script' \
    --arguments edit

complete --command scriptura \
    --condition __fish_use_subcommand \
    --exclusive \
    --description 'Display script content' \
    --arguments cat

complete --command scriptura \
    --condition __fish_use_subcommand \
    --exclusive \
    --description 'Display script path' \
    --arguments which

complete --command scriptura \
    --condition "__fish_seen_subcommand_from $subcommands new (__scriptura_subcommands)" \
    --condition 'not __scriptura_seen_script' \
    --arguments '(__scriptura_complete_script)'

complete --command scriptura \
    --condition "__fish_seen_subcommand_from $subcommands new (__scriptura_subcommands)" \
    --condition __scriptura_seen_script \
    --condition 'not contains -- "--" (commandline -xpc)' \
    --arguments --

complete --command scriptura \
    --condition "__fish_seen_subcommand_from $subcommands (__scriptura_subcommands)" \
    --condition __scriptura_seen_script \
    --condition 'contains -- "--" (commandline -xpc)' \
    --force-files

complete --command scriptura \
    --condition '__fish_seen_subcommand_from new' \
    --condition __scriptura_seen_script \
    --condition 'contains -- "--" (commandline -xpc)' \
    --arguments '(__scriptura_complete_new)'