2020-05-24 16:48:43 +00:00
|
|
|
#!/usr/bin/bash
|
|
|
|
# shellcheck disable=SC1090
|
|
|
|
|
|
|
|
__PROXY__="${0:A:h}/proxy.py"
|
|
|
|
|
|
|
|
proxy() {
|
2021-04-06 12:49:03 +00:00
|
|
|
source <(env "DEFAULT_PROXY=$DEFAULT_PROXY" "$__PROXY__" "$1")
|
2020-05-24 16:48:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
_proxy() {
|
|
|
|
local -r commands=('enable' 'disable' 'status')
|
|
|
|
compset -P '*,'
|
|
|
|
compadd -S '' "${commands[@]}"
|
|
|
|
}
|
|
|
|
|
|
|
|
compdef '_proxy' 'proxy'
|