mbruzek@warhorse:/etc/bash_completion.d$ grep services *juju*
juju2:for k,v in j["services"].items():
juju2:# Print (return) all services
juju2:_juju_services_from_file() {
juju2:print "\n".join(j["services"].keys());' < ${1?}
juju2:# Print (return) both services and units, currently used for juju status completion
juju2:_juju_services_and_units_from_file() {
juju2: _juju_services_from_file "$@"
juju2: *\<service*) echo _juju_services_from_file;;
juju2: *pattern*) echo _juju_services_and_units_from_file;; # e.g. status
juju-core:for k,v in j["services"].items():
juju-core:# Print (return) all services
juju-core:_juju_services_from_file() {
juju-core:print "\n".join(j["services"].keys());' < ${1?}
juju-core:# Print (return) both services and units, currently used for juju status completion
juju-core:_juju_services_and_units_from_file() {
juju-core: _juju_services_from_file "$@"
juju-core: *\<service*) echo _juju_services_from_file;;
juju-core: *pattern*) echo _juju_services_and_units_from_file;; # e.g. status
juju-core2:for k,v in j["services"].items():
juju-core2:# Print (return) all services
juju-core2:_juju_services_from_file() {
juju-core2:print "\n".join(j["services"].keys());' < ${1?}
juju-core2:# Print (return) both services and units, currently used for juju status completion
juju-core2:_juju_services_and_units_from_file() {
juju-core2: _juju_services_from_file "$@"
juju-core2: *\<service*) echo _juju_services_from_file;;
juju-core2: *pattern*) echo _juju_services_and_units_from_file;; # e.g. status