##// END OF EJS Templates
contrib: update tcsh_completion for Mercurial 1.8...
Gilles Moris -
r13515:26163257 1.8 stable
parent child Browse files
Show More
@@ -1,50 +1,50 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 1.5.4+154-8b452fe4bf50)
5 # Mercurial Distributed SCM (version 1.7.5+157-8a220ae0b2ba)
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 --config \
23 --debug \
23 --debug \
24 --debugger \
24 --debugger \
25 --encoding \
25 --encoding \
26 --encodingmode \
26 --encodingmode \
27 --traceback \
27 --traceback \
28 --time \
28 --time \
29 --profile \
29 --profile \
30 --version \
30 --version \
31 -h --help)/' \
31 -h --help)/' \
32 'p/1/(add addremove annotate blame archive \
32 'p/1/(add addremove annotate blame archive \
33 backout bisect branch branches bundle \
33 backout bisect bookmarks branch branches \
34 cat clone commit ci copy \
34 bundle cat clone commit ci \
35 cp debugancestor debugbuilddag debugcheckstate debugcommands \
35 copy cp debugancestor debugbuilddag debugcheckstate \
36 debugcomplete debugdag debugdata debugdate debugfsinfo \
36 debugcommands debugcomplete debugdag debugdata debugdate \
37 debugindex debugindexdot debuginstall debugpushkey debugrebuildstate \
37 debugfsinfo debugignore debugindex debugindexdot debuginstall \
38 debugrename debugrevspec debugsetparents debugstate debugsub \
38 debugpushkey debugrebuildstate debugrename debugrevspec debugsetparents \
39 debugwalk diff export forget grep \
39 debugstate debugsub debugwalk diff export \
40 heads help identify id import \
40 forget grep heads help identify \
41 patch incoming in init locate \
41 id import patch incoming in \
42 log history manifest merge outgoing \
42 init locate log history manifest \
43 out parents paths pull push \
43 merge outgoing out parents paths \
44 recover remove rm rename mv \
44 pull push recover remove rm \
45 resolve revert rollback root serve \
45 rename move mv resolve revert \
46 showconfig debugconfig status st summary \
46 rollback root serve showconfig debugconfig \
47 sum tag tags tip unbundle \
47 status st summary sum tag \
48 update up checkout co verify \
48 tags tip unbundle update up \
49 version)/'
49 checkout co verify version)/'
50
50
@@ -1,73 +1,74 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 '/^enabled extensions:/,$d' \
40 -e '/^enabled extensions:/,$d' \
41 -e '/^additional help topics:/,$d' \
41 -e '/^ [^ ]/!d; s/[,:]//g;' | \
42 -e '/^ [^ ]/!d; s/[,:]//g;' | \
42 xargs -n5 | \
43 xargs -n5 | \
43 sed -e '$!s/$/ \\\\/g; 2,$s/^ */ /g'`
44 sed -e '$!s/$/ \\\\/g; 2,$s/^ */ /g'`
44
45
45 hg_global_options=`hg -v help | \
46 hg_global_options=`hg -v help | \
46 sed -e '1,/global/d;/^ *-/!d; s/ [^- ].*//' | \
47 sed -e '1,/global/d;/^ *-/!d; s/ [^- ].*//' | \
47 sed -e 's/ *$//; $!s/$/ \\\\/g; 2,$s/^ */ /g'`
48 sed -e 's/ *$//; $!s/$/ \\\\/g; 2,$s/^ */ /g'`
48
49
49 hg_version=`hg version | sed -e '1q'`
50 hg_version=`hg version | sed -e '1q'`
50
51
51 script_name=`basename $0`
52 script_name=`basename $0`
52
53
53 cat > $tcsh_file <<END
54 cat > $tcsh_file <<END
54 #
55 #
55 # tcsh completion for Mercurial
56 # tcsh completion for Mercurial
56 #
57 #
57 # This file has been auto-generated by $script_name for
58 # This file has been auto-generated by $script_name for
58 # $hg_version
59 # $hg_version
59 #
60 #
60 # Copyright (C) 2005 TK Soh.
61 # Copyright (C) 2005 TK Soh.
61 #
62 #
62 # This is free software; you can redistribute it and/or modify it under
63 # 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
64 # 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
65 # Software Foundation; either version 2 of the License, or (at your
65 # option) any later version.
66 # option) any later version.
66 #
67 #
67
68
68 complete hg \\
69 complete hg \\
69 'n/--cwd/d/' 'n/-R/d/' 'n/--repository/d/' \\
70 'n/--cwd/d/' 'n/-R/d/' 'n/--repository/d/' \\
70 'C/-/($hg_global_options)/' \\
71 'C/-/($hg_global_options)/' \\
71 'p/1/($hg_commands)/'
72 'p/1/($hg_commands)/'
72
73
73 END
74 END
General Comments 0
You need to be logged in to leave comments. Login now