feat: add support for bash

This commit is contained in:
Junya Okabe 2024-06-19 02:39:55 +09:00
parent a80a252e39
commit 6fab752db5

View file

@ -4,13 +4,15 @@ function _ghq () {
case $cword in
1)
COMPREPLY=( $(compgen -W "get list" -- $cur) );;
COMPREPLY=( $(compgen -W "get list rm" -- $cur) );;
2)
case $prev in
get)
COMPREPLY=( $(compgen -W "$(ghq list --unique)" -- $cur) );;
list)
COMPREPLY=( $(compgen -W "$(ghq list)" -- $cur) );;
rm)
COMPREPLY=( $(compgen -W "$(ghq list)" -- $cur) );;
esac;;
*)
COMPREPLY=( $(compgen -W "$(ls)" -- $cur) );;