PSA: Script for linkifying GitHub commits, issues and pull requests in git command output

When I encounter a reference to a commit, issue or pull request in the terminal output of a git command (e.g. git log or git show), I find it tedious to copy/paste the pull request number or commit hash into a URL so that I can view it in GitHub. So I’ve added a script to LLVM that addresses this problem by making text that appears to be a reference to a commit, issue or pull request into a GitHub link. It uses a relatively new feature supported by many terminals that allows any text to be linkified with an arbitrary URL. You can find further information including instructions on how to configure git to automatically use it for terminal-bound output here.

8 Likes