1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-12-25 13:51:57 +00:00
ohmyzsh/plugins/shell-proxy/shell-proxy.plugin.zsh
2020-05-24 18:48:43 +02:00

16 lines
255 B
Bash

#!/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'