From 5f8134b10ab7b6e2fc91ff25efe7324c0ab99c85 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Wed, 11 Jan 2012 21:03:05 +0900 Subject: [PATCH] completion can be used with alias g(git) --- .bashrc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.bashrc b/.bashrc index ca15a9f..e16df8f 100755 --- a/.bashrc +++ b/.bashrc @@ -259,6 +259,12 @@ _mygitconfig(){ fi } +if type _git >/dev/null 2>&1 # enable programmable completion when alias g=git +then + complete -o bashdefault -o default -o nospace -F _git g 2>/dev/null \ + || complete -o default -o nospace -F _git g +fi + __my_parse_svn_branch() { local LANG=C local svn_url=$(svn info 2>/dev/null | sed -ne 's#^URL: ##p')