Skip to content

Commit d71f2b5

Browse files
committed
feat: add partial flag support to fish and zsh completions
1 parent 4101d6a commit d71f2b5

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

misc/fish/ghq.fish

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ complete -c ghq -n '__fish_seen_subcommand_from get' -l no-recursive -d 'Prevent
3636
complete -c ghq -n '__fish_seen_subcommand_from get' -s b -l branch -d 'Specify branch name. This flag implies --single-branch on Git'
3737
complete -c ghq -n '__fish_seen_subcommand_from get' -s P -l parallel -d 'Import parallelly'
3838
complete -c ghq -n '__fish_seen_subcommand_from get' -l bare -d 'Do a bare clone'
39+
function __complete_get_partial
40+
printf '%s\t%s\n' 'blobless' 'Do a blobless clone'
41+
printf '%s\t%s\n' 'treeless' 'Do a treeless clone'
42+
end
43+
complete -c ghq -n '__fish_seen_subcommand_from get' -l partial -d 'Do a partial clone' -xa '(__complete_get_partial)'
3944

4045
complete -c ghq -n '__fish_seen_subcommand_from list' -s e -l exact -d 'Perform an exact match'
4146
complete -c ghq -n '__fish_seen_subcommand_from list' -l vcs -d 'Specify vcs backend for matching'

misc/zsh/_ghq

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ function _ghq () {
2727
'--bare[Do a bare clone]' \
2828
'(-b --branch)'{-b,--branch}'[Specify branch name]' \
2929
'(-P --parallel)'{-P,--parallel}'[Import parallelly]' \
30+
'--partial[Do a partial clone]: :(blobless treeless)' \
3031
'(-)*:: :->null_state' \
3132
&& ret=0
3233
;;

0 commit comments

Comments
 (0)