Discover, install, and configure shell plugins with Fig Plugin Store →
👾

Pctl

zsh plugin for proxy

ytet5uy4
|
8 stars
1 forks

pctl - zsh plugin for proxy

Overview | Installation | Configuration | License

license-badge release-badge

Overview

This is zsh plugin to toggle the environment variables of proxy.

screenshot

Installation

You can use zplug to install pctl. Add the following to your .zshrc:

zplug 'ytet5uy4/pctl'

Configuration

Add the following to your .zshenv:

export PCTL_PROXY_ADDRESS=proxy.example.com PCTL_PROXY_PORT=8080

or

If you have envchain installed, run following command:

$ envchain --set proxy PCTL_PROXY_ADDRESS PCTL_PROXY_PORT
proxy.PCTL_PROXY_ADDRESS: proxy.example.com
proxy.PCTL_PROXY_PORT: 8080

To keep the environment variables of proxy when using sudo, append the following to /etc/sudoers via sudo visudo:

Defaults env_keep += "http_proxy https_proxy"

License

Copyright (c) 2015 ytet5uy4

Released under the MIT License, see LICENSE.md.