1 parent 6216231 commit 9e46e2eCopy full SHA for 9e46e2e
1 file changed
zsh/.zshrc
@@ -206,6 +206,12 @@ alias ghprurl='gh pr view --json url | jq -r .url'
206
alias ghpropen='gh pr view --web'
207
# get repo url
208
alias ghrepourl='gh repo view --json url | jq -r .url'
209
+# get github commit url for HEAD or a given rev
210
+function ghcommiturl() {
211
+ local sha
212
+ sha=$(git rev-parse "${1:-HEAD}") || return 1
213
+ echo "$(gh repo view --json url -q .url)/commit/${sha}"
214
+}
215
216
# Other aliases
217
0 commit comments