From 6b8788d86328e97ebc7442fb1924d13ce50add56 Mon Sep 17 00:00:00 2001 From: Wolfgang Müller Date: Sun, 14 Nov 2021 12:52:07 +0100 Subject: Initial commit --- completions/sail.fish | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 completions/sail.fish (limited to 'completions') diff --git a/completions/sail.fish b/completions/sail.fish new file mode 100644 index 0000000..bf87670 --- /dev/null +++ b/completions/sail.fish @@ -0,0 +1,16 @@ +complete -c sail -s a -l add -d 'Add a jump for the current directory' +complete -c sail -s e -l edit -d 'Edit the jump file' +complete -c sail -s p -l print -d 'Print the jump file' + +complete -x -c sail -a "(__sailfish_suggest)" + +function __sailfish_suggest + set -l jumps (__sailfish_print_jumpfile) + + test -r $jumps; or return 1 + + set -l cmd (commandline -co) + test (count $cmd) -gt 1; and return 1 + + cat $jumps +end -- cgit v1.2.3-2-gb3c3