##// END OF EJS Templates
Update tcsh completion scripts with new commands and for new help output....
Gilles Moris -
r7766:2b254834 default
parent child Browse files
Show More
@@ -1,42 +1,49 b''
1 1 #
2 2 # tcsh completion for Mercurial
3 3 #
4 4 # This file has been auto-generated by tcsh_completion_build.sh for
5 # Mercurial Distributed SCM (version 325c07fd2ebd)
5 # Mercurial Distributed SCM (version 1.1.2)
6 6 #
7 7 # Copyright (C) 2005 TK Soh.
8 8 #
9 9 # This is free software; you can redistribute it and/or modify it under
10 10 # the terms of the GNU General Public License as published by the Free
11 11 # Software Foundation; either version 2 of the License, or (at your
12 12 # option) any later version.
13 13 #
14 14
15 15 complete hg \
16 16 'n/--cwd/d/' 'n/-R/d/' 'n/--repository/d/' \
17 17 'C/-/( -R --repository \
18 18 --cwd \
19 19 -y --noninteractive \
20 20 -q --quiet \
21 21 -v --verbose \
22 --config \
22 23 --debug \
23 24 --debugger \
25 --encoding \
26 --encodingmode \
27 --lsprof \
24 28 --traceback \
25 29 --time \
26 30 --profile \
27 31 --version \
28 32 -h --help)/' \
29 'p/1/(add addremove annotate bundle cat \
30 clone commit ci copy cp \
31 debugancestor debugcheckstate debugconfig debugdata debugindex \
32 debugindexdot debugrename debugstate debugwalk diff \
33 export forget grep heads help \
34 identify id import patch incoming \
35 in init locate log history \
36 manifest outgoing out parents paths \
37 pull push rawcommit recover remove \
38 rm rename mv revert root \
39 serve status tag tags tip \
40 unbundle undo update up checkout \
41 co verify version)/'
33 'p/1/(add addremove annotate blame archive \
34 backout bisect branch branches bundle \
35 cat clone commit ci copy \
36 cp debugancestor debugcheckstate debugcomplete debugdata \
37 debugdate debugfsinfo debugindex debugindexdot debuginstall \
38 debugrawcommit rawcommit debugrebuildstate debugrename debugsetparents \
39 debugstate debugwalk diff export grep \
40 heads help identify id import \
41 patch incoming in init locate \
42 log history manifest merge outgoing \
43 out parents paths pull push \
44 recover remove rm rename mv \
45 resolve revert rollback root serve \
46 showconfig debugconfig status st tag \
47 tags tip unbundle update up \
48 checkout co verify version)/'
42 49
@@ -1,73 +1,73 b''
1 1 #!/bin/sh
2 2
3 3 #
4 4 # tcsh_completion_build.sh - script to generate tcsh completion
5 5 #
6 6 #
7 7 # Copyright (C) 2005 TK Soh.
8 8 #
9 9 # This is free software; you can redistribute it and/or modify it under
10 10 # the terms of the GNU General Public License as published by the Free
11 11 # Software Foundation; either version 2 of the License, or (at your
12 12 # option) any later version.
13 13 #
14 14 #
15 15 # Description
16 16 # -----------
17 17 # This script generates a tcsh source file to support completion
18 18 # of Mercurial commands and options.
19 19 #
20 20 # Instruction:
21 21 # -----------
22 22 # Run this script to generate the tcsh source file, and source
23 23 # the file to add command completion support for Mercurial.
24 24 #
25 25 # tcsh% tcsh_completion.sh FILE
26 26 # tcsh% source FILE
27 27 #
28 28 # If FILE is not specified, tcsh_completion will be generated.
29 29 #
30 30 # Bugs:
31 31 # ----
32 32 # 1. command specific options are not supported
33 33 # 2. hg commands must be specified immediately after 'hg'.
34 34 #
35 35
36 36 tcsh_file=${1-tcsh_completion}
37 37
38 38 hg_commands=`hg --debug help | \
39 39 sed -e '1,/^list of commands:/d' \
40 -e '/^global options:/,$d' \
40 -e '/^enabled extensions:/,$d' \
41 41 -e '/^ [^ ]/!d; s/[,:]//g;' | \
42 42 xargs -n5 | \
43 43 sed -e '$!s/$/ \\\\/g; 2,$s/^ */ /g'`
44 44
45 45 hg_global_options=`hg -v help | \
46 46 sed -e '1,/global/d;/^ *-/!d; s/ [^- ].*//' | \
47 47 sed -e 's/ *$//; $!s/$/ \\\\/g; 2,$s/^ */ /g'`
48 48
49 49 hg_version=`hg version | sed -e '1q'`
50 50
51 51 script_name=`basename $0`
52 52
53 53 cat > $tcsh_file <<END
54 54 #
55 55 # tcsh completion for Mercurial
56 56 #
57 57 # This file has been auto-generated by $script_name for
58 58 # $hg_version
59 59 #
60 60 # Copyright (C) 2005 TK Soh.
61 61 #
62 62 # This is free software; you can redistribute it and/or modify it under
63 63 # the terms of the GNU General Public License as published by the Free
64 64 # Software Foundation; either version 2 of the License, or (at your
65 65 # option) any later version.
66 66 #
67 67
68 68 complete hg \\
69 69 'n/--cwd/d/' 'n/-R/d/' 'n/--repository/d/' \\
70 70 'C/-/($hg_global_options)/' \\
71 71 'p/1/($hg_commands)/'
72 72
73 73 END
General Comments 0
You need to be logged in to leave comments. Login now