git_autocomplete 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,8 @@
1
- == 0.0.1 2008-02-05
1
+ == 0.2.0 2008-02-07
2
+
3
+ * Support for merge + diff commands [thx Ernesto Caballero]
4
+
5
+ == 0.1.0 2008-02-05
2
6
 
3
7
  * 1 major enhancement:
4
8
  * Initial release
data/README.txt CHANGED
@@ -3,10 +3,16 @@ Contains a git CLI autocompletion script for bash users.
3
3
  Currently, it autocompletes on local branch names for checkout cmds.
4
4
 
5
5
  In the following, the 'mas' would autocomplete to 'master' in most cases:
6
- * git checkout mas
6
+ * git checkout mas
7
+ * git-checkout mas
7
8
  * git co mas
8
9
  * gco mas
9
10
 
11
+ This is a work-in-progress. I'd like it to also autocomplete
12
+ on git commands, like <code>git brTAB</code> --> <code>git branch</code>,
13
+ but this is less important since you can autocomplete already
14
+ on <code>git-br</code>.
15
+
10
16
  INSTALLATION
11
17
 
12
18
  * Install ruby + the rubygems package system
@@ -18,7 +18,7 @@ module GitAutocomplete
18
18
  # Returns the +after_match+ string, if the prefix of the +cmd_str+
19
19
  # is a valid command that expects a branch name.
20
20
  def branch_completion?(cmd_str)
21
- valid_cmds = ['git checkout', 'git co', 'gco']
21
+ valid_cmds = ['git checkout', 'git-checkout', 'git co', 'gco', 'git merge', 'git-merge', 'git diff', 'git-diff']
22
22
  valid_cmds_str = valid_cmds.join('|')
23
23
  return nil unless /^(#{valid_cmds_str})\b/ =~ cmd_str
24
24
  $'.strip # after_match
@@ -1,7 +1,7 @@
1
1
  module GitAutocomplete #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
- MINOR = 1
4
+ MINOR = 2
5
5
  TINY = 0
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
@@ -27,6 +27,11 @@ class TestCommand < Test::Unit::TestCase
27
27
 
28
28
  def test_supported_branch_cmd_names
29
29
  assert_equal("mas", @command.branch_completion?("git checkout mas"), "Should be autocompletion for branches")
30
+ assert_equal("mas", @command.branch_completion?("git-checkout mas"), "Should be autocompletion for branches")
31
+ assert_equal("mas", @command.branch_completion?("git merge mas"), "Should be autocompletion for branches")
32
+ assert_equal("mas", @command.branch_completion?("git-merge mas"), "Should be autocompletion for branches")
33
+ assert_equal("mas", @command.branch_completion?("git diff mas"), "Should be autocompletion for branches")
34
+ assert_equal("mas", @command.branch_completion?("git-diff mas"), "Should be autocompletion for branches")
30
35
  assert_equal("mas", @command.branch_completion?("git co mas"), "Should be autocompletion for branches")
31
36
  assert_equal("mas", @command.branch_completion?("gco mas"), "Should be autocompletion for branches")
32
37
  assert_equal("origin/mas", @command.branch_completion?("gco origin/mas"), "Should be autocompletion for branches")
@@ -33,33 +33,53 @@
33
33
  <h1>git_autocomplete</h1>
34
34
  <div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/git_autocomplete"; return false'>
35
35
  <p>Get Version</p>
36
- <a href="http://rubyforge.org/projects/git_autocomplete" class="numbers">0.1.0</a>
36
+ <a href="http://rubyforge.org/projects/git_autocomplete" class="numbers">0.2.0</a>
37
37
  </div>
38
- <h1>&#x2192; &#8216;git_autocomplete&#8217;</h1>
38
+ <h1>&#x2192; Git autocompletion for Bash</h1>
39
39
 
40
40
 
41
41
  <h2>What</h2>
42
42
 
43
43
 
44
- <h2>Installing</h2>
44
+ <p>Contains a git <span class="caps">CLI</span> autocompletion script for bash users.</p>
45
45
 
46
46
 
47
- <p><pre class='syntax'><span class="ident">sudo</span> <span class="ident">gem</span> <span class="ident">install</span> <span class="ident">git_autocomplete</span></pre></p>
47
+ <p>Currently, it autocompletes on local branch names for checkout cmds.</p>
48
48
 
49
49
 
50
- <h2>The basics</h2>
50
+ In the following, the &#8216;mas&#8217; would autocomplete to &#8216;master&#8217; in most cases:
51
+ <ul>
52
+ <li>git checkout mas</li>
53
+ <li>git-checkout mas</li>
54
+ <li>git co mas</li>
55
+ <li>gco mas</li>
56
+ </ul>
51
57
 
52
58
 
53
- <h2>Demonstration of usage</h2>
59
+ <p>This is a work-in-progress. I&#8217;d like it to also autocomplete
60
+ on git commands, like <code>git brTAB</code>&#8212;&gt; <code>git branch</code>,
61
+ but this is less important since you can autocomplete already
62
+ on <code>git-br</code>.</p>
54
63
 
55
64
 
56
- <h2>Forum</h2>
65
+ <h2>Installing</h2>
66
+
57
67
 
68
+ <p>To use this project, you&#8217;ll need to have ruby + the rubygems package system installed.</p>
58
69
 
59
- <p><a href="http://groups.google.com/group/git_autocomplete">http://groups.google.com/group/git_autocomplete</a></p>
70
+
71
+ <pre>sudo gem install git_autocomplete</pre>
72
+
73
+ To your ~/.bashrc (etc), add:
74
+ <pre>
75
+ complete -C git_autocomplete -o default git
76
+ complete -C git_autocomplete -o default gco
77
+ </pre>
78
+
79
+ <h2>Forum</h2>
60
80
 
61
81
 
62
- <p><span class="caps">TODO</span> &#8211; create Google Group &#8211; git_autocomplete</p>
82
+ <p><a href="http://groups.google.com/group/drnicutilities">http://groups.google.com/group/drnicutilities</a></p>
63
83
 
64
84
 
65
85
  <h2>How to submit patches</h2>
@@ -68,7 +88,7 @@
68
88
  <p>Read the <a href="http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/">8 steps for fixing other people&#8217;s code</a> and for section <a href="http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/#8b-google-groups">8b: Submit patch to Google Groups</a>, use the Google Group above.</p>
69
89
 
70
90
 
71
- <p>The trunk repository is <code>svn://rubyforge.org/var/svn/git_autocomplete/trunk</code> for anonymous access.</p>
91
+ <p>Access the source via git <code>http://github.com/drnic/git_autocompletion/tree/master</code></p>
72
92
 
73
93
 
74
94
  <h2>License</h2>
@@ -80,7 +100,7 @@
80
100
  <h2>Contact</h2>
81
101
 
82
102
 
83
- <p>Comments are welcome. Send an email to <a href="mailto:drnicwilliams@gmail.com">Dr Nic Williams</a> via the <a href="http://groups.google.com/group/git_autocomplete">forum</a></p>
103
+ <p>Comments are welcome. Send an email to <a href="mailto:drnicwilliams@gmail.com">Dr Nic Williams</a> via the <a href="http://groups.google.com/group/drnicutilities">forum</a></p>
84
104
  <p class="coda">
85
105
  <a href="drnicwilliams@gmail.com">Dr Nic Williams</a>, 5th February 2008<br>
86
106
  Theme extended from <a href="http://rb2js.rubyforge.org/">Paul Battley</a>
@@ -1,33 +1,46 @@
1
1
  h1. git_autocomplete
2
2
 
3
- h1. &#x2192; 'git_autocomplete'
4
-
3
+ h1. &#x2192; Git autocompletion for Bash
5
4
 
6
5
  h2. What
7
6
 
7
+ Contains a git CLI autocompletion script for bash users.
8
8
 
9
- h2. Installing
9
+ Currently, it autocompletes on local branch names for checkout cmds.
10
10
 
11
- <pre syntax="ruby">sudo gem install git_autocomplete</pre>
11
+ In the following, the 'mas' would autocomplete to 'master' in most cases:
12
+ * git checkout mas
13
+ * git-checkout mas
14
+ * git co mas
15
+ * gco mas
12
16
 
13
- h2. The basics
17
+ This is a work-in-progress. I'd like it to also autocomplete
18
+ on git commands, like <code>git brTAB</code> --> <code>git branch</code>,
19
+ but this is less important since you can autocomplete already
20
+ on <code>git-br</code>.
14
21
 
22
+ h2. Installing
15
23
 
16
- h2. Demonstration of usage
24
+ To use this project, you'll need to have ruby + the rubygems package system installed.
17
25
 
26
+ <pre>sudo gem install git_autocomplete</pre>
18
27
 
28
+ To your ~/.bashrc (etc), add:
29
+ <pre>
30
+ complete -C git_autocomplete -o default git
31
+ complete -C git_autocomplete -o default gco
32
+ </pre>
19
33
 
20
- h2. Forum
21
34
 
22
- "http://groups.google.com/group/git_autocomplete":http://groups.google.com/group/git_autocomplete
35
+ h2. Forum
23
36
 
24
- TODO - create Google Group - git_autocomplete
37
+ "http://groups.google.com/group/drnicutilities":http://groups.google.com/group/drnicutilities
25
38
 
26
39
  h2. How to submit patches
27
40
 
28
41
  Read the "8 steps for fixing other people's code":http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/ and for section "8b: Submit patch to Google Groups":http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/#8b-google-groups, use the Google Group above.
29
42
 
30
- The trunk repository is <code>svn://rubyforge.org/var/svn/git_autocomplete/trunk</code> for anonymous access.
43
+ Access the source via git <code>http://github.com/drnic/git_autocompletion/tree/master</code>
31
44
 
32
45
  h2. License
33
46
 
@@ -35,5 +48,5 @@ This code is free to use under the terms of the MIT license.
35
48
 
36
49
  h2. Contact
37
50
 
38
- Comments are welcome. Send an email to "Dr Nic Williams":mailto:drnicwilliams@gmail.com via the "forum":http://groups.google.com/group/git_autocomplete
51
+ Comments are welcome. Send an email to "Dr Nic Williams":mailto:drnicwilliams@gmail.com via the "forum":http://groups.google.com/group/drnicutilities
39
52
 
@@ -39,7 +39,7 @@ blockquote {
39
39
  }
40
40
 
41
41
  #main {
42
- width: 45em;
42
+ width: 55em;
43
43
  padding: 0;
44
44
  margin: 0 auto;
45
45
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git_autocomplete
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dr Nic Williams
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-02-05 00:00:00 +10:00
12
+ date: 2008-02-07 00:00:00 +10:00
13
13
  default_executable:
14
14
  dependencies: []
15
15