diff --git a/plugins/github/README.md b/plugins/github/README.md index 5d8b62501..8cda00662 100644 --- a/plugins/github/README.md +++ b/plugins/github/README.md @@ -6,6 +6,12 @@ This plugin supports working with GitHub from the command line. It provides a fe * Completion for the [`github` Ruby gem](https://github.com/defunkt/github-gem). * Convenience functions for working with repos and URLs. +### Aliases + +| Alias | Command | +| :--------------------- | :----------------------------------------------------------------------------------------------------------------------------- | +| `gho` | `open_command "$(git config --get remote.origin.url | sed -e "s#git@.*\.*github\.com:#https://github.com/#" -e "s/\.git$//")"` | + ### Functions * `empty_gh` - Creates a new empty repo (with a `README.md`) and pushes it to GitHub diff --git a/plugins/github/github.plugin.zsh b/plugins/github/github.plugin.zsh index 79114ff69..cd40b954c 100644 --- a/plugins/github/github.plugin.zsh +++ b/plugins/github/github.plugin.zsh @@ -3,6 +3,9 @@ if (( $+commands[hub] )); then alias git=hub fi +# Aliases +alias gho='open_command "$(git config --get remote.origin.url | sed -e "s#git@.*\.*github\.com:#https://github.com/#" -e "s/\.git$//")"' + # Functions ################################################################# # Based on https://github.com/dbb/githome/blob/master/.config/zsh/functions