himanshub16 / ProxyMan

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

fix: handling symlinks for bashrc and zshrc files #80

Closed matthieusb closed 5 years ago

matthieusb commented 5 years ago

If you are using symlinks to store your .bashrc or .zshrc file elsewhere, ProxyMan will overwrite them when setting or unsetting them.

With this fix, this will allow people to use symlinks for these configuration files.

himanshub16 commented 5 years ago

Hi @matthieusb Sorry for the late reply. I really appreciate your contribution.

GNU sed has --follow-symlink support, but not BSD sed, esp. the one which comes shipped with MacOS by default.

Although, I am not a Mac user, some way to support those who would perhaps be using ProxyMan on Macs would be better.

I found readlink -f and realpath to be a good-choice, and decided to go with readlink -f. more

Since, it has been a delay on my part, I shall fix this on this same branch and merge.

Thanks :relaxed:

himanshub16 commented 5 years ago

Fixes #77

matthieusb commented 5 years ago

No problem for the delays. I did not know about bsd sed, thanks for the hands up !

And thanks for making your tool available, it is a blessing !