contrib/bash_completion
changeset 1115 89f54e72581d
parent 1018 bb3f23fe59f0
child 1149 f82b084bd904
--- 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