Permalink
Browse files

.aliases: Add `gurl` for Gzip-enabled `curl`

Ref. 1b3ed7a.
  • Loading branch information...
1 parent 61748c9 commit 1aeba0cba820db7f412536cb8aed30f28ec1a9a8 @mathiasbynens committed Aug 27, 2012
Showing with 3 additions and 5 deletions.
  1. +3 −0 .aliases
  2. +0 −5 .functions
View
@@ -41,6 +41,9 @@ export LS_COLORS='no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40
# Enable aliases to be sudo’ed
alias sudo='sudo '
+# Gzip-enabled `curl`
+alias gurl="curl --compressed"
+
# Get OS X Software Updates, and update Homebrew, npm, and their installed packages
alias update='sudo softwareupdate -i -a; brew update; brew upgrade; npm update npm -g; npm update -g'
View
@@ -66,11 +66,6 @@ function httpcompression() {
encoding="$(curl -LIs -H 'User-Agent: Mozilla/5 Gecko' -H 'Accept-Encoding: gzip,deflate,compress,sdch' "$1" | grep '^Content-Encoding:')" && echo "$1 is encoded using ${encoding#* }" || echo "$1 is not using any encoding"
}
-# Gzip-enabled `curl`
-function gurl() {
- curl -sH "Accept-Encoding: gzip" "$@" | gunzip
-}
-
# Syntax-highlight JSON strings or files
# Usage: `json '{"foo":42}'` or `echo '{"foo":42}' | json`
function json() {

0 comments on commit 1aeba0c

Please sign in to comment.