shell-proxy.plugin.zsh 255 B

12345678910111213141516
  1. #!/usr/bin/bash
  2. # shellcheck disable=SC1090
  3. __PROXY__="${0:A:h}/proxy.py"
  4. proxy() {
  5. source <("$__PROXY__" "$1")
  6. }
  7. _proxy() {
  8. local -r commands=('enable' 'disable' 'status')
  9. compset -P '*,'
  10. compadd -S '' "${commands[@]}"
  11. }
  12. compdef '_proxy' 'proxy'