himanshub16 / ProxyMan

Configuring proxy settings made easy.
https://github.com/himanshub16/ProxyMan/releases/latest/
MIT License
690 stars 107 forks source link

adding unset command to bashrc #107

Closed john891226 closed 3 years ago

john891226 commented 3 years ago

current unset command doesn't remove current proxy envars forcing to logout because proxyman only removes export sentence and while executing source ~/.bashrc leaves current envar configured

himanshub16 commented 3 years ago

Hey @john891226 Thanks for the diff.

The changes look good. I have few concerns and design choices to make

Thus, the user should be able to get rid of proxyman correctly too.

Therefore, during unset, instead of asking user to run source ~/.bashrc, the message during exit can be

# To work without proxy settings, either restart terminal session, 
#  or copy-paste the line below in currently open tabs

for v in `set | grep -i proxy | cut -d\= -f1`; do unset $v; done

What do you think?

himanshub16 commented 3 years ago

Closing the PR as it can override with other tools/scripts trying to manage proxy settings apart from ProxyMan. Feel free to comment if you believe otherwise.