changeset 1115:89f54e72581d

bash_completion: add debugindex and debugdata support
author mpm@selenic.com
date Sat, 27 Aug 2005 20:42:53 -0700
parents 58371c4c2c8f
children 0cdd73b0767c
files contrib/bash_completion
diffstat 1 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/bash_completion	Sat Aug 27 19:15:02 2005 -0700
+++ b/contrib/bash_completion	Sat Aug 27 20:42:53 2005 -0700
@@ -1,3 +1,5 @@
+#!/bin/bash
+
 _hg_commands()
 {
     local commands="$(hg -v help | sed -e '1,/^list of commands:/d' \
@@ -8,7 +10,7 @@
     # specifically asked for
     if [[ "$cur" == de* ]]; then
 	commands="$commands debugcheckstate debugstate debugindex"
-	commands="$commands debugindexdot debugwalk"
+	commands="$commands debugindexdot debugwalk debugdata"
     fi
     COMPREPLY=( ${COMPREPLY[@]:-} $(compgen -W "$commands" -- "$cur") )
 }
@@ -135,6 +137,12 @@
 	    fi
 	    COMPREPLY=(${COMPREPLY[@]:-} $( compgen -d -- "$cur" ))
 	;;
+	debugindex|debugindexdot)
+	    COMPREPLY=(${COMPREPLY[@]:-} $( compgen -f -X "!*.i" -- "$cur" ))
+	;;
+	debugdata)
+	    COMPREPLY=(${COMPREPLY[@]:-} $( compgen -f -X "!*.d" -- "$cur" ))
+	;;
 	cat)
 	    local count=$(_hg_count_non_option -o --output)
 	    if [ $count = 2 ]; then