bashrc & zshrc: Add gitio function.

Like the name says, it shortens URLs with git.io.
This commit is contained in:
nyuszika7h 2012-01-06 20:24:36 +02:00 committed by Mika Suomalainen
parent 47d53949cf
commit 0bd04767ac
2 changed files with 12 additions and 0 deletions

6
bashrc
View File

@ -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

6
zshrc
View File

@ -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