[dim PATCH] completion: complete dim retip to local branches

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Jani Nikula <jani.nikula@xxxxxxxxx>
---
 bash_completion | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/bash_completion b/bash_completion
index 7dfc4b86cb13..25c8c61f2eac 100644
--- a/bash_completion
+++ b/bash_completion
@@ -9,6 +9,11 @@ dim ()
 	fi
 }
 
+_dim_git_branches()
+{
+	git for-each-ref --format='%(refname:short)' refs/heads
+}
+
 _dim ()
 {
 	local args arg cur prev words cword split
@@ -107,6 +112,9 @@ _dim ()
 				COMPREPLY=( $( compgen -W "$nightly_branches all" -- $cur ) )
 			fi
 			;;
+		retip)
+			COMPREPLY=($(compgen -W "$(_dim_git_branches)" -- $cur))
+			;;
 	esac
 
 	return 0
-- 
2.1.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux