Skip to contentSkip to conversation

bash completion: Add completion for 'git mv'

PATCH In review Shawn O. Pearce 1 participant 1 message Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 8/8 bash completion: Add completion for 'git mv'

The missing patch 8.

Signature · 1 line
Shawn.

Added completions for all long options specified in the docs

        --dry-run
---
 contrib/completion/git-completion.bash |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)
contrib/completion/git-completion.bash +13 -0
index 936cd35..57b8c0f 100755
@@ -983,6 +983,18 @@ _git_merge_base ()
 	__gitcomp "$(__git_refs)"
 }
 
+_git_mv ()
+{
+	local cur="${COMP_WORDS[COMP_CWORD]}"
+	case "$cur" in
+	--*)
+		__gitcomp "--dry-run"
+		return
+		;;
+	esac
+	COMPREPLY=()
+}
+
 _git_name_rev ()
 {
 	__gitcomp "--tags --all --stdin"
@@ -1615,6 +1627,7 @@ _git ()
 	ls-tree)     _git_ls_tree ;;
 	merge)       _git_merge;;
 	merge-base)  _git_merge_base ;;
+	mv)          _git_mv ;;
 	name-rev)    _git_name_rev ;;
 	pull)        _git_pull ;;
 	push)        _git_push ;;
Signature · 1 line
1.6.0.rc1.48.g2b6032