Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Avoid infinite loop in __gs_relative_path when $(PWD) contains a symlink... #42
[Resending pull request - I had closed my previous request because I thought "readlink -f" would fall over when given a non-symlinked path, but it handles it just fine]
When $(PWD) has a symlinked directory, in function __gs_relative_path, the comparison becomes between an absolute path and symlinked directory, resulting in the while loop never terminating, and "gs" for example getting stuck forever. The patch first resolves $(PWD) to an absolute path.
For example I have a ~/work directory that maps to the base of all my sources, and I typically do |cd ~/work| to go there.