shell-proxy.plugin.zsh 255 Bytes
Newer Older
Septs's avatar
Septs committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/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'