Skip to content

Commit

Permalink
add SNAP bin path to bash completion
Browse files Browse the repository at this point in the history
For snapped versions of Juju which reside in /snap/bin/juju we need to make bash
completion aware of this additional binary path.

Signed-off-by: Adam Stokes <[email protected]>
  • Loading branch information
Adam Stokes committed Feb 7, 2017
1 parent 20b593c commit 2e20d7a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions etc/bash_completion.d/juju-2
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,9 @@ export _JUJU_2_cache_TTL=2
# Detect juju built from source (highest priority)
if [ -x "$GOPATH/bin/juju" ]; then
export _juju_cmd_JUJU_2="$GOPATH/bin/juju"
# Snap version of juju
elif [ -x "/snap/bin/juju" ]; then
export _juju_cmd_JUJU_2="/snap/bin/juju"
# Detect installed juju-2 binary (next highest priority)
elif [ -x "/usr/bin/juju-2" ]; then
export _juju_cmd_JUJU_2="/usr/bin/juju-2"
Expand Down

0 comments on commit 2e20d7a

Please sign in to comment.