mirror of
https://github.com/sorin-ionescu/prezto.git
synced 2025-01-23 13:02:15 +08:00
Remove extra use of grep in git-hub-shorten-url (#904)
This commit is contained in:
parent
fb689449a7
commit
12d48dfcf9
@ -16,7 +16,7 @@ if [[ -z "$url" ]]; then
|
||||
fi
|
||||
|
||||
if (( $+commands[curl] )); then
|
||||
curl -s -i 'http://git.io' -F "url=$url" | grep 'Location:' | sed 's/Location: //'
|
||||
curl -s -i 'http://git.io' -F "url=$url" | sed -n 's/^Location: //p'
|
||||
else
|
||||
print "$0: command not found: curl" >&2
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user