iterm2-dwim icon indicating copy to clipboard operation
iterm2-dwim copied to clipboard

Try relative path relative to root of git repository

Open dandavison opened this issue 7 years ago • 0 comments

Currently a parse rule exists that tries to interpret a relative path as relative to the current directory CWD.

However, it's fairly common to be in an internal directory of the git repo, and yet be looking at a path in some output that is relative to the root of the git repo. In that situation, no parse rule will cerrently match.

We could add a parse rule that works as follows: ask git whether CWD is in a git repo and if so what the root is (git rev-parse --show-toplevel), and try the path relative to that root.

dandavison avatar Aug 23 '17 23:08 dandavison