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