Merge lp:~tribaal/ubuntu/saucy/juju-core/add-bash-completion into lp:ubuntu/saucy/juju-core

Proposed by Chris Glass
Status: Merged
Merge reported by: James Page
Merged at revision: not available
Proposed branch: lp:~tribaal/ubuntu/saucy/juju-core/add-bash-completion
Merge into: lp:ubuntu/saucy/juju-core
Diff against target: 46 lines (+21/-0)
3 files modified
debian/changelog (+7/-0)
debian/etc/bash_completion.d/juju-core (+13/-0)
debian/rules (+1/-0)
To merge this branch: bzr merge lp:~tribaal/ubuntu/saucy/juju-core/add-bash-completion
Reviewer Review Type Date Requested Status
James Page Approve
Review via email: mp+177287@code.launchpad.net

Description of the change

This branch adds a rudimentary but functional autocomplete to all top-level juju commands.

For example, after installing a package build with this packaging branch, you can type "juju boo<tab>" and the bash_completion package will auto expand it to "juju bootstrap".

This is one of my first ubuntu packaging branches, so please feel free to let me know if I should have used another mechanism than dh_install to achieve this (but it seems like a rational approach).

To post a comment you must log in.
Revision history for this message
James Page (james-page) :
review: Approve
Revision history for this message
James Page (james-page) wrote :

I'll merge this with the 1.12 upload this week.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2013-07-23 08:51:44 +0000
3+++ debian/changelog 2013-07-28 16:28:28 +0000
4@@ -1,3 +1,10 @@
5+juju-core (1.11.4-0ubuntu2) saucy; urgency=low
6+
7+ * Added d/etc/bash-completion.d/juju-core,and added a dh_install command
8+ to the rules file to install the file.
9+
10+ -- Christopher Glass (Ubuntu) <christopher.glass@ubuntu.com> Sun, 28 Jul 2013 18:19:15 +0200
11+
12 juju-core (1.11.4-0ubuntu1) saucy; urgency=low
13
14 * New upstream release:
15
16=== added directory 'debian/etc'
17=== added directory 'debian/etc/bash_completion.d'
18=== added file 'debian/etc/bash_completion.d/juju-core'
19--- debian/etc/bash_completion.d/juju-core 1970-01-01 00:00:00 +0000
20+++ debian/etc/bash_completion.d/juju-core 2013-07-28 16:28:28 +0000
21@@ -0,0 +1,13 @@
22+# juju-core completion
23+
24+_juju()
25+{
26+ local cur prev options files targets
27+ COMPREPLY=()
28+ cur="${COMP_WORDS[COMP_CWORD]}"
29+ prev="${COMP_WORDS[COMP_CWORD-1]}"
30+ actions=$(juju help commands | awk '{print $1}')
31+ COMPREPLY=( $( compgen -W "${actions}" -- ${cur} ) )
32+ return 0
33+}
34+complete -F _juju juju
35
36=== modified file 'debian/rules'
37--- debian/rules 2013-07-22 11:36:48 +0000
38+++ debian/rules 2013-07-28 16:28:28 +0000
39@@ -28,6 +28,7 @@
40 dh_install bin/juju usr/lib/juju-$(VERSION)/bin
41 dh_install bin/jujud usr/lib/juju-$(VERSION)/bin
42 dh_install juju.1 usr/lib/juju-$(VERSION)/man/man1
43+ dh_install debian/etc/bash_completion.d/juju-core etc/bash_completion.d/
44 dh_auto_install
45
46 override_dh_auto_clean:

Subscribers

People subscribed via source and target branches

to all changes: