From c8177bdd3061bb23027f369153d16a0b1e3591c3 Mon Sep 17 00:00:00 2001 From: Emily Grace Seville Date: Thu, 10 Aug 2023 01:30:34 +1000 Subject: [PATCH] Add horcrux completion (#9922) * feat(completions): horcrux * feat(changelog): mention completion * fix(completion): condition for -n (cherry picked from commit f9d21cc21d6559891fe44f0bc325c25d291a7253) --- share/completions/horcrux.fish | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 share/completions/horcrux.fish diff --git a/share/completions/horcrux.fish b/share/completions/horcrux.fish new file mode 100644 index 000000000..aa05e2d71 --- /dev/null +++ b/share/completions/horcrux.fish @@ -0,0 +1,8 @@ +set -l subcommands 'bind split' +set -l subcommand_show_condition "not __fish_seen_subcommand_from $subcommands" +set -l split_option_show_condition "__fish_seen_subcommand_from split" + +complete -c horcrux -a bind -n "$subcommand_show_condition" -f -d 'Bind directory' +complete -c horcrux -a split -n "$subcommand_show_condition" -f -d 'Split file' +complete -c horcrux -s n -r -n "$split_option_show_condition" -d 'Count of horcruxes to make' +complete -c horcrux -s t -r -n "$split_option_show_condition" -d 'Count of horcruxes required to resurrect the original file'