From 12d48dfcf9f8b082ee462242f0fde99bdde3c06d Mon Sep 17 00:00:00 2001 From: Zhiming Wang Date: Wed, 5 Apr 2017 00:36:28 -0400 Subject: [PATCH] Remove extra use of grep in git-hub-shorten-url (#904) --- modules/git/functions/git-hub-shorten-url | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/git/functions/git-hub-shorten-url b/modules/git/functions/git-hub-shorten-url index 77e4b0ba..d37b04eb 100644 --- a/modules/git/functions/git-hub-shorten-url +++ b/modules/git/functions/git-hub-shorten-url @@ -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