diff options
Diffstat (limited to 'completions')
| -rw-r--r-- | completions/gitctl.bash | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/completions/gitctl.bash b/completions/gitctl.bash index 497d0a8..520d842 100644 --- a/completions/gitctl.bash +++ b/completions/gitctl.bash @@ -29,13 +29,13 @@ _gitctl() { return fi - # complete repo names for the name argument of desc/delete/add-remote (one + # complete repo names for the name argument of desc/move/delete/add-remote (one # ssh call). Only at the name position and not while typing a flag, so a # stray Tab elsewhere never hits the network. `repo list` prints an aligned # table (no color when not a TTY, as here); the name is the first field, and # we drop the NAME header row. if [[ $cword -eq 3 && $group == repo && $cur != -* \ - && ( $action == desc || $action == delete || $action == add-remote ) ]]; then + && ( $action == desc || $action == move || $action == delete || $action == add-remote ) ]]; then local repos repos=$(gitctl repo list 2>/dev/null | awk 'NR>1 {print $1}') local IFS=$'\n' @@ -50,7 +50,7 @@ _gitctl() { 2) case $group in sections) COMPREPLY=($(compgen -W "list add" -- "$cur")) ;; - repo) COMPREPLY=($(compgen -W "create list desc add-remote delete" -- "$cur")) ;; + repo) COMPREPLY=($(compgen -W "create list desc move add-remote delete" -- "$cur")) ;; esac return ;; esac @@ -59,6 +59,7 @@ _gitctl() { if [[ $cur == -* ]]; then case "$group $action" in "repo create") COMPREPLY=($(compgen -W "--section --private --desc --owner" -- "$cur")) ;; + "repo move") COMPREPLY=($(compgen -W "--section" -- "$cur")) ;; "repo add-remote") COMPREPLY=($(compgen -W "--remote-name" -- "$cur")) ;; esac return |
