Merge lp:~asc/spud/spudaliasbashcompletion into lp:spud

Proposed by Adam Candy
Status: Merged
Merged at revision: 486
Proposed branch: lp:~asc/spud/spudaliasbashcompletion
Merge into: lp:spud
Prerequisite: lp:~spud/spud/alias
Diff against target: 38 lines (+8/-2)
2 files modified
AUTHORS (+3/-2)
diamond/misc/diamond-bash-completion (+5/-0)
To merge this branch: bzr merge lp:~asc/spud/spudaliasbashcompletion
Reviewer Review Type Date Requested Status
Adam Candy Approve
Review via email: mp+74450@code.launchpad.net

Description of the change

Added bash completion for aliases.
Note you'll need your bash environment to source this file.

To post a comment you must log in.
lp:~asc/spud/spudaliasbashcompletion updated
451. By Adam Candy

The entry 'default' is now always listed as one of the possible aliases. Thanks for the suggestion Fraser.

Revision history for this message
Adam Candy (asc) wrote :

Informally reviewed by Fraser with the code in front of us.

review: Approve
lp:~asc/spud/spudaliasbashcompletion updated
452. By Adam Candy

Merge in of trunk.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'AUTHORS'
2--- AUTHORS 2011-09-07 15:23:35 +0000
3+++ AUTHORS 2011-09-07 15:48:25 +0000
4@@ -9,15 +9,16 @@
5 Individuals
6 -----------
7
8-Fraser Waters <fraser.waters08@imperial.ac.uk>
9+Adam Candy <adam.candy@imperial.ac.uk>
10 Gareth Collins
11 Colin Cotter <colin.cotter@imperial.ac.uk>
12 Patrick Farrell <patrick.farrell@imperial.ac.uk>
13+Gerard Gorman <g.gorman@imperial.ac.uk>
14 David Ham <david.ham@imperial.ac.uk>
15-Gerard Gorman <g.gorman@imperial.ac.uk>
16 Stephan Kramer
17 James Maddison
18 Matthew Piggott <m.d.piggott@imperial.ac.uk>
19 Jemma Shipton
20 Adrian Umpleby <adrian@imperial.ac.uk>
21+Fraser Waters <fraser.waters08@imperial.ac.uk>
22 Cian Wilson
23
24=== modified file 'diamond/misc/diamond-bash-completion'
25--- diamond/misc/diamond-bash-completion 2011-07-07 10:21:50 +0000
26+++ diamond/misc/diamond-bash-completion 2011-09-07 15:48:25 +0000
27@@ -9,6 +9,11 @@
28 _get_comp_words_by_ref cur prev
29
30 case $prev in
31+ -a)
32+ cur=${COMP_WORDS[COMP_CWORD]}
33+ COMPREPLY=( $(compgen -W "$( find "${HOME}/.diamond/schemata/" -maxdepth 1 -type f ! -iname ".*" -print | while read file; do cat ${file} | grep ' = ' | sed -e 's/ *=.*$//' | tr '\n' ' '; done; echo -n 'default ' )" -- $cur ) )
34+ return 0
35+ ;;
36 -s)
37 _filedir '@(rng)'
38 return 0

Subscribers

People subscribed via source and target branches