diff options
author | triallax <triallax@tutanota.com> | 2023-09-20 19:54:16 +0100 |
---|---|---|
committer | Leah Neukirchen <leah@vuxu.org> | 2023-10-22 01:28:11 +0200 |
commit | 87845f52f18e1dedc963f1c7a86b33f3248d21fe (patch) | |
tree | 0f1a5cccff4b706bb05fe25a9a125d297305b9d5 /fish/completions/xrevbump.fish | |
parent | a3742437505609e847ba7e59c60ea395e708e729 (diff) | |
download | xtools-87845f52f18e1dedc963f1c7a86b33f3248d21fe.tar.gz xtools-87845f52f18e1dedc963f1c7a86b33f3248d21fe.tar.xz xtools-87845f52f18e1dedc963f1c7a86b33f3248d21fe.zip |
completions: add fish completions.
Diffstat (limited to 'fish/completions/xrevbump.fish')
-rw-r--r-- | fish/completions/xrevbump.fish | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/fish/completions/xrevbump.fish b/fish/completions/xrevbump.fish new file mode 100644 index 0000000..dfb2979 --- /dev/null +++ b/fish/completions/xrevbump.fish @@ -0,0 +1,11 @@ +function __xrevbump_complete_git_commit_args + set -l tokens (commandline -poc; commandline -ct) + set -l dashdash (contains -i -- -- $tokens); or return + set -e tokens[1..$dashdash] + complete --do-complete="git commit $tokens" +end + +complete -c xrevbump -f +complete -c xrevbump -n 'not contains -- -- (commandline -poc)' -n '[ (count (commandline -poc)) -gt 1 ]' -a '(__xtools_complete_packages)' +# Complete `git commit` args after `--` +complete -c xrevbump -a '(__xrevbump_complete_git_commit_args)' |