🔩 An oh-my-zsh
plugin that configures proxy environment variables based on macOS's system preferences automatically.
- Clone this repository into
$ZSH_CUSTOM/plugins
(by default~/.oh-my-zsh/custom/plugins
)
git clone https://github.com/sukkaw/zsh-osx-autoproxy ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-osx-autoproxy
- Add the plugin to the list of plugins for oh-my-zsh to load (inside
~/.zshrc
):
plugins=(
[plugins
...]
zsh-osx-autoproxy
)
- Start a new terminal session.
Antigen is a zsh plugin manager, and it support oh-my-zsh
plugin as well. You only need to add antigen bundle sukkaw/zsh-osx-autoproxy
to your .zshrc
with your other bundle commands if you are using Antigen. Antigen will handle cloning the plugin for you automatically the next time you start zsh. You can also add the plugin to a running zsh with antigen bundle sukkaw/zsh-osx-autoproxy
for testing before adding it to your .zshrc
.
After install the plugin and have proxy configured in System Prefrences
, start a new terminal session and following environment variables will be set (if applicable):
http_proxy
https_proxy
ftp_proxy
all_proxy
If you install zsh-osx-autoproxy
with Antigen, you need to remove antigen bundle sukkaw/zsh-osx-autoproxy
to disable the plugin.
If you install zsh-osx-autoproxy
with oh-myzsh, you need to remove zsh-osx-autoproxy
item from plugin array, then rm -rf ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-osx-autoproxy
to remove the plugin.
zsh-osx-autoproxy © Sukka, Released under the MIT License.
Authored and maintained by Sukka with help from contributors (list).
Personal Website · Blog · GitHub @SukkaW · Telegram Channel @SukkaChannel · Twitter @isukkaw · Keybase @sukka