Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.0, 1.0.1, and 1.0.2

Support options and make a difference between options and commands

Changeset 89630af7fb20

Parent fdc3a3fa6270

by Andreas Tscharner

Changes to one file · Browse files at 89630af7fb20 Showing diff from parent fdc3a3fa6270 Diff from another changeset...

 
1
2
3
 
4
5
6
7
8
9
 
10
11
 
 
 
 
 
 
 
 
12
13
14
 
1
2
 
3
4
5
6
7
8
 
9
10
 
11
12
13
14
15
16
17
18
19
 
20
@@ -1,14 +1,20 @@
 _hgtk()  { - local cur prev opts + local cur prev opts cmds     COMPREPLY=()   cur="${COMP_WORDS[COMP_CWORD]}"   prev="${COMP_WORDS[COMP_CWORD-1]}"   - opts="about add annotate archive blame checkout clone commit datamine diff filter email forget grep guess hgignore history ignore init incoming log merge outgoing pull push recovery remove rename repoconfig revert rollback serve shelve status strip synch unshelve update userconfig vdiff verify version" + cmds="about add annotate archive blame checkout clone commit datamine diff filter email forget grep guess hgignore history ignore init incoming log merge outgoing pull push recovery remove rename repoconfig revert rollback serve shelve status strip synch unshelve update userconfig vdiff verify version"   - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) + opts="-R --repository -v --verbose -q --quiet -h --help --debugger --nofork --fork --listfile" + + if [[ ${cur} == -* ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) + else + COMPREPLY=( $(compgen -W "${cmds}" -- ${cur}) ) + fi + return 0  } -  complete -F _hgtk hgtk