From abc2fc2cb0dcb42bb535159a9afdca5dc72182a6 Mon Sep 17 00:00:00 2001 From: nps1ngh Date: Sun, 11 Dec 2022 15:08:30 +0100 Subject: [PATCH] Completions for `ouch` (#9405) * Completions for `ouch` * `ouch` completions: also add `l` to subcommands --- share/completions/ouch.fish | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 share/completions/ouch.fish diff --git a/share/completions/ouch.fish b/share/completions/ouch.fish new file mode 100644 index 000000000..f1d15017c --- /dev/null +++ b/share/completions/ouch.fish @@ -0,0 +1,26 @@ +# fish completions for ouch https://github.com/ouch-org/ouch + +# subcommands list +set -l commands c compress d decompress l list help + +# if no subcommand yet then no file completion +complete -c ouch -f --condition "not __fish_seen_subcommand_from $commands" + +# subcommand completions +complete -c ouch --condition "not __fish_seen_subcommand_from $commands" \ + -a "compress" -d "Compress one or more files into one output file [aliases: c]" +complete -c ouch --condition "not __fish_seen_subcommand_from $commands" \ + -a "decompress" -d "Decompresses one or more files, optionally into another folder [aliases: d]" +complete -c ouch --condition "not __fish_seen_subcommand_from $commands" \ + -a "list" -d "List contents of an archive [aliases: l]" +complete -c ouch --condition "not __fish_seen_subcommand_from $commands" \ + -a "help" -d "Print this message or the help of the given subcommand(s)" + +# options completions +complete -c ouch -s y -l yes -d "Skip [Y/n] questions positively" +complete -c ouch -s n -l no -d "Skip [Y/n] questions negatively" +complete -c ouch -s A -l accessible -d "Activate accessibility mode, reducing visual noise [env: ACCESSIBLE=]" +complete -c ouch -s H -l hidden -d "Ignores hidden files" +complete -c ouch -s g -l gitignore -d "Ignores files matched by git's ignore files" +complete -c ouch -s h -l help -d "Print help information (use `--help` for more detail)" +complete -c ouch -s V -l version -d "Print version information"