d65a1535935d6210273ddf31b165e966ca335bc0
- Author
- Robby Russell <robby@planetargon.com>
- Committer
- Robby Russell <robby@planetargon.com>
- Date
Message
Merge pull request #2595 from ksamdev/git.io
Add github url shortener
Diff
1diff --git a/plugins/github/github.plugin.zsh b/plugins/github/github.plugin.zsh
2index 66a10cfdb14ca966a6d9a948a58487d63bbed69a..25b1a1e1b42b6bbb25e7273ddf527035c9b31e74 100644
3--- a/plugins/github/github.plugin.zsh
4+++ b/plugins/github/github.plugin.zsh
5@@ -84,5 +84,14 @@ exist_gh() { # [DIRECTORY]
6 git push -u origin master
7 }
8
9+# git.io "GitHub URL"
10+#
11+# Shorten GitHub url, example:
12+# https://github.com/nvogel/dotzsh > http://git.io/8nU25w
13+# source: https://github.com/nvogel/dotzsh
14+# documentation: https://github.com/blog/985-git-io-github-url-shortener
15+#
16+git.io() {curl -i -s http://git.io -F "url=$1" | grep "Location" | cut -f 2 -d " "}
17+
18 # End Functions #############################################################
19