ohmyzsh/plugins/shell-proxy/shell-proxy.plugin.zsh

17 lines
255 B
Bash
Raw Normal View History

2020-05-24 09:48:43 -07:00
#!/usr/bin/bash
# shellcheck disable=SC1090
__PROXY__="${0:A:h}/proxy.py"
proxy() {
source <("$__PROXY__" "$1")
}
_proxy() {
local -r commands=('enable' 'disable' 'status')
compset -P '*,'
compadd -S '' "${commands[@]}"
}
compdef '_proxy' 'proxy'