##// END OF EJS Templates
bash_completion: add debugindex and debugdata support
mpm@selenic.com -
r1115:89f54e72 default
parent child Browse files
Show More
@@ -1,3 +1,5 b''
1 #!/bin/bash
2
1 _hg_commands()
3 _hg_commands()
2 {
4 {
3 local commands="$(hg -v help | sed -e '1,/^list of commands:/d' \
5 local commands="$(hg -v help | sed -e '1,/^list of commands:/d' \
@@ -8,7 +10,7 b''
8 # specifically asked for
10 # specifically asked for
9 if [[ "$cur" == de* ]]; then
11 if [[ "$cur" == de* ]]; then
10 commands="$commands debugcheckstate debugstate debugindex"
12 commands="$commands debugcheckstate debugstate debugindex"
11 commands="$commands debugindexdot debugwalk"
13 commands="$commands debugindexdot debugwalk debugdata"
12 fi
14 fi
13 COMPREPLY=( ${COMPREPLY[@]:-} $(compgen -W "$commands" -- "$cur") )
15 COMPREPLY=( ${COMPREPLY[@]:-} $(compgen -W "$commands" -- "$cur") )
14 }
16 }
@@ -135,6 +137,12 b''
135 fi
137 fi
136 COMPREPLY=(${COMPREPLY[@]:-} $( compgen -d -- "$cur" ))
138 COMPREPLY=(${COMPREPLY[@]:-} $( compgen -d -- "$cur" ))
137 ;;
139 ;;
140 debugindex|debugindexdot)
141 COMPREPLY=(${COMPREPLY[@]:-} $( compgen -f -X "!*.i" -- "$cur" ))
142 ;;
143 debugdata)
144 COMPREPLY=(${COMPREPLY[@]:-} $( compgen -f -X "!*.d" -- "$cur" ))
145 ;;
138 cat)
146 cat)
139 local count=$(_hg_count_non_option -o --output)
147 local count=$(_hg_count_non_option -o --output)
140 if [ $count = 2 ]; then
148 if [ $count = 2 ]; then
General Comments 0
You need to be logged in to leave comments. Login now