Package: git-completion Version: 0+20060817-1 Severity: wishlist Tags: patch
When referencing commits by hash name, it is convenient to have a completion. Here is a working concept, which needs to be polished, but works effectively: --- /etc/bash_completion.d/git-common 2006-09-11 17:36:22.000000000 +0100 +++ git-common 2007-07-04 21:46:37.000000000 +0100 @@ -49,6 +49,7 @@ { __git_heads __git_tags + __git_ents echo HEAD } @@ -64,3 +65,9 @@ $REVERTGLOB } +__git_ents() +{ + REVERTGLOB=`shopt -p nullglob` + find .git -wholename '*/objects/??/*' -print | cut -c 14,15,17- + $REVERTGLOB +} w -- System Information: Debian Release: 4.0 APT prefers stable APT policy: (500, 'stable') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.18-4-486 Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) -- no debconf information -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]