diff --git a/bashrc b/bashrc index 911587cf..4e074930 100755 --- a/bashrc +++ b/bashrc @@ -407,6 +407,12 @@ case "$1" in fi } +# Given by nyuszika7h. Shortens GitHub URLs with git.io +gitio () { + curl -s -i http://git.io -F "url=$1" | grep + --color=never -P '^Location: ' | awk '{ print $2 }' + } + ##### Tmux (example) 4G2W9C ##### # This should be put in .custom or .bash_custom diff --git a/zshrc b/zshrc index acb982a5..9c4a6b1a 100755 --- a/zshrc +++ b/zshrc @@ -350,6 +350,12 @@ case "$1" in fi } +# Given by nyuszika7h. Shortens GitHub URLs with git.io +gitio () { + curl -s -i http://git.io -F "url=$1" | grep + --color=never -P '^Location: ' | awk '{ print $2 }' + } + ##### Tmux (example) 4G2W9C ##### # This should be put in .custom or .zsh_custom