Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Fixed bash completions #6499
Conversation
bz2
suggested changes
Oct 25, 2016
Thanks! See comments for a couple of suggested changes.
| @@ -99,7 +99,8 @@ endif | ||
| # Install bash_completion | ||
| install-etc: | ||
| @echo Installing bash completion | ||
| - @sudo install -o root -g root -m 644 etc/bash_completion.d/juju2 /etc/bash_completion.d | ||
| + @sudo install -o root -g root -m 644 etc/bash_completion.d/juju-2.0 /etc/bash_completion.d | ||
| + @sudo install -o root -g root -m 644 etc/bash_completion.d/juju-version /etc/bash_completion.d |
bz2
Oct 25, 2016
Contributor
These locations should probably be updated to the new /usr/share/bash-completion/bash_completion location. The split between /etc and there is also the cause of much confusion.
| + for k, v in j.get("applications", {}).items(): | ||
| + all_units.extend(v.get("units", {}).keys()) | ||
| + print ("\n".join([unit + trail for unit in all_units])) | ||
| +except: pass |
bz2
Oct 25, 2016
Contributor
I think we don't want try:/except: pass - yes the kipple when things break is bad, but things being broken with no feedback as to why is worse I feel.
| + | ||
| +# Detect juju built from source (highest priority) | ||
| +if [ -x "$GOPATH/bin/juju" ]; then | ||
| + export _juju_cmd_JUJU_2_0="$GOPATH/bin/juju" |
bz2
Oct 25, 2016
Contributor
This seems good. Might mean developers see packaging issues less, but in exchange will be catching their own problems instead.
dimitern
Oct 25, 2016
Contributor
Yeah, and makes completions work for devs as well as other users :)
|
$$merge$$ |
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju |
dimitern commentedOct 25, 2016
•
Edited 1 time
-
dimitern
Oct 25, 2016
Makefile's install-etc was not installing juju-version
Changed the completions to work for a juju binary, built
from source, as well as the one from the juju-2.0 package.
See bug http://pad.lv/1622775 for more details
(PR was intended to fix it, but simply improves CLI UX)
QA steps: