1
2
3
4
5
6
7
8
9
10
11
12
13
14 | juju() { if [[ $1 == "status" ]]; then shift; command juju status --color $@ | less -r elif [[ $1 == "run-action" ]]; then shift; action_id=`set -o pipefail; command juju run-action "$@" | cut -f2 -d:` if [[ $? == 0 ]]; then command juju show-action-output --wait 0 $action_id fi else command juju "$@" fi } |