all repos — scriptura @ 969bbaa1ac239023697e5f7e8d7f3b50037d0633

a corner in $HOME for your scripts

fix completion with multi-level folders

Alan Pearce
commit

969bbaa1ac239023697e5f7e8d7f3b50037d0633

parent

fce68bc9f273e73e437b7e9cf72a0d175028ff28

1 file changed, 6 insertions(+), 1 deletion(-)

changed files
M completions/scriptura.fishcompletions/scriptura.fish
@@ -35,7 +35,7 @@ complete --command scriptura \
--condition '__fish_seen_subcommand_from $(__scriptura_print $SCRIPTURA_ROOT)' \ --condition 'not __scriptura_seen_script $(commandline -xpc)' \ --condition 'not __fish_seen_argument --short n --long new' \ - --arguments '$(__scriptura_complete $SCRIPTURA_ROOT/$(commandline -xpc)[-1])' + --arguments '$(__scriptura_complete $SCRIPTURA_ROOT $(commandline -xpc))' complete --command scriptura \ --condition '__scriptura_seen_script $(commandline -xpc)' \
@@ -46,6 +46,11 @@ path basename $(path filter --type file,dir --perm exec $from/*)
end function __scriptura_complete --argument-names from + for arg in $argv[2..-1] + if path is --type dir $from/$arg + set --function from $from/$arg + end + end for entry in $(path filter --type file,dir --perm exec $from/*) printf "%s\t%s\n" $(path basename $entry) $(__scriptura_help $entry) end