Skip to content

Commit 9bb6aaa

Browse files
authored
Merge pull request #390 from Okabe-Junya/rm-completion
feat(misc): support "ghq rm" completion
2 parents 1acf651 + 07297a7 commit 9bb6aaa

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

misc/bash/_ghq

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@ function _ghq () {
44

55
case $cword in
66
1)
7-
COMPREPLY=( $(compgen -W "get list" -- $cur) );;
7+
COMPREPLY=( $(compgen -W "get list rm" -- $cur) );;
88
2)
99
case $prev in
1010
get)
1111
COMPREPLY=( $(compgen -W "$(ghq list --unique)" -- $cur) );;
1212
list)
1313
COMPREPLY=( $(compgen -W "$(ghq list)" -- $cur) );;
14+
rm)
15+
COMPREPLY=( $(compgen -W "$(ghq list)" -- $cur) );;
1416
esac;;
1517
*)
1618
COMPREPLY=( $(compgen -W "$(ls)" -- $cur) );;

misc/zsh/_ghq

+6
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,12 @@ function _ghq () {
5151
'(-)*:: :->null_state' \
5252
&& ret=0
5353
;;
54+
(rm)
55+
_arguments -C \
56+
'--dry-run[Do not remove actually]' \
57+
'(-)*:: :->null_state' \
58+
&& ret=0
59+
;;
5460
(help|h)
5561
__ghq_commands && ret=0
5662
;;

0 commit comments

Comments
 (0)