1
0
mirror of https://github.com/dcarrillo/prezto.git synced 2025-06-14 08:41:43 +00:00

[#23] Rename plugins to modules

This commit is contained in:
Sorin Ionescu
2012-03-28 12:41:39 -04:00
parent a75bbff43f
commit a7340886b3
73 changed files with 159 additions and 159 deletions

View File

@ -0,0 +1,23 @@
#
# Shortens GitHub URLs.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
local url="$1"
if [[ "$url" == '-' ]]; then
read url <&0
fi
if [[ -z "$url" ]]; then
print "usage: $0 [ url | - ]" >&2
fi
if (( $+commands[curl] )); then
curl -s -i 'http://git.io' -F "url=$url" | grep 'Location:' | sed 's/Location: //'
else
print "$0: command not found: curl" >&2
fi