# "run"time juju completion by version _juju_complete_ver() { case "$(juju version)" in 2.*) # See /etc/bash_completion.d/juju _juju_complete_2 "$@" return $? ;; 1.*) # See /etc/bash_completion.d/juju-core _juju "$@" return $? ;; esac } # Hook _juju_complete_ver for 'juju' cmd # If juju-1 is also installed, it'll override it's completion # as this "juju-version" named file will be loaded after # "juju-2" and "juju-core". complete -F _juju juju-1 complete -F _juju_complete_ver juju # vim: ai et sw=2 ts=2