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