diff options
Diffstat (limited to 'code-review.bash-completion')
-rw-r--r-- | code-review.bash-completion | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/code-review.bash-completion b/code-review.bash-completion new file mode 100644 index 0000000..6da8b9c --- /dev/null +++ b/code-review.bash-completion @@ -0,0 +1,20 @@ +function _code_review () { + local cur + local subcommands="changed-files commits diff difftool start stat" + + COMPREPLY=() + cur=${COMP_WORDS[COMP_CWORD]} + + case "$COMP_CWORD" in + 1 | 2) + COMPREPLY=( $( compgen -W "$subcommands" -- $cur ) ) + ;; + 3) + COMPREPLY=() + ;; + esac + + return 0 +} + +complete -o default -F _code_review code-review |