mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-20 03:02:29 +01:00
Added plugin to Juju support
This commit is contained in:
parent
96e4e5dd03
commit
5a6fbdb6d7
2 changed files with 114 additions and 0 deletions
8
plugins/juju/README.md
Normal file
8
plugins/juju/README.md
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
# juju autocomplete plugin
|
||||
|
||||
* Adds autocomplete options for all juju commands.
|
||||
* Based on https://code.launchpad.net/~benji/+junk/zsh-juju-completion
|
||||
|
||||
## Requirements
|
||||
|
||||
In order to make this work, you will need to have the Juju (DevOps Destiled) set up in your path.
|
||||
106
plugins/juju/_juju
Normal file
106
plugins/juju/_juju
Normal file
|
|
@ -0,0 +1,106 @@
|
|||
#compdef juju
|
||||
|
||||
_main() {
|
||||
local curcontext="$curcontext" state line
|
||||
typeset -A opt_args
|
||||
|
||||
_arguments \
|
||||
'1: :->command'\
|
||||
'*: :->options'
|
||||
|
||||
case $state in
|
||||
command)
|
||||
_arguments "1:command:(add-relation add-unit bootstrap get set debug-log debug-hooks deploy destroy-environment destroy-service expose open-tunnel remove-relation remove-unit resolved scp status ssh terminate-machine unexpose upgrade-charm)"
|
||||
;;
|
||||
*)
|
||||
case $words[2] in
|
||||
|
||||
add-relation)
|
||||
compadd "$@" - -h --help --environment -e --verbose
|
||||
;;
|
||||
|
||||
add-unit)
|
||||
compadd "$@" - -h --help --environment -e --num-units -n
|
||||
;;
|
||||
|
||||
bootstrap)
|
||||
compadd "$@" - -h --help --environment -e
|
||||
;;
|
||||
|
||||
get)
|
||||
compadd "$@" - -h --help --environment -e --schema -s
|
||||
;;
|
||||
|
||||
set)
|
||||
compadd "$@" - -h --help --environment -e --config
|
||||
;;
|
||||
|
||||
debug-log)
|
||||
compadd "$@" - -h --help -e --environment -r --replay -i --include -x --exclude -l --level -n --limit -o --output
|
||||
;;
|
||||
|
||||
debug-hooks)
|
||||
compadd "$@" - -h --help -e --environment
|
||||
;;
|
||||
|
||||
deploy)
|
||||
compadd "$@" - -h --help --environment -e --num-units -n --repository --config
|
||||
;;
|
||||
|
||||
destroy-environment)
|
||||
compadd "$@" - -h --help --environment -e
|
||||
;;
|
||||
|
||||
destroy-service)
|
||||
compadd "$@" - -h --help --environment -e
|
||||
;;
|
||||
|
||||
expose)
|
||||
compadd "$@" - -h --help --environment -e
|
||||
;;
|
||||
|
||||
open-tunnel)
|
||||
compadd "$@" - -h --help --environment -e
|
||||
;;
|
||||
|
||||
remove-relation)
|
||||
compadd "$@" - -h --help --environment -e --verbose
|
||||
;;
|
||||
|
||||
remove-unit)
|
||||
compadd "$@" - -h --help --environment -e
|
||||
;;
|
||||
|
||||
resolved)
|
||||
compadd "$@" - -h --help --retry -r --environment -e
|
||||
;;
|
||||
|
||||
scp)
|
||||
compadd "$@" - -h --help --environment -e
|
||||
;;
|
||||
|
||||
status)
|
||||
compadd "$@" - -h --help --environment -e --output --format
|
||||
;;
|
||||
|
||||
ssh)
|
||||
compadd "$@" - -h --help --environment -e
|
||||
;;
|
||||
|
||||
terminate-machine)
|
||||
compadd "$@" - -h --help --environment -e
|
||||
;;
|
||||
|
||||
unexpose)
|
||||
compadd "$@" - -h --help --environment -e
|
||||
;;
|
||||
|
||||
upgrade-charm)
|
||||
compadd "$@" - -h --help --dry-run -n --environment -e --repository
|
||||
;;
|
||||
|
||||
esac
|
||||
esac
|
||||
}
|
||||
|
||||
_main "$@"
|
||||
Loading…
Add table
Add a link
Reference in a new issue