Add horcrux completion (#9922)

* feat(completions): horcrux

* feat(changelog): mention completion

* fix(completion): condition for -n
This commit is contained in:
Emily Grace Seville 2023-08-10 01:30:34 +10:00 committed by GitHub
parent 21ddfabb8d
commit f9d21cc21d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 0 deletions

View File

@ -42,6 +42,7 @@ Completions
- ``krita`` (:issue:`9903`).
- ``blender`` (:issue:`9905`).
- ``gimp`` (:issue:`9904`).
- ``horcrux`` (:issue:`9922`).
Improved terminal support
^^^^^^^^^^^^^^^^^^^^^^^^^

View File

@ -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'