oh-my-fish/plugins/proxy/_proxy_set.fish

14 lines
327 B
Fish
Raw Normal View History

2014-06-05 21:02:45 +00:00
function _proxy_set -a proxy \
-d "Set all proxy vars to specified value"
set -l envars http_proxy ftp_proxy https_proxy all_proxy no_proxy \
HTTP_PROXY HTTPS_PROXY FTP_PROXY NO_PROXY ALL_PROXY
for envar in $envars
if test $proxy = '-e'
set -e $envar
else
set -gx $envar $proxy
end
end
end