aboutsummaryrefslogtreecommitdiffstats
path: root/.functions
diff options
context:
space:
mode:
Diffstat (limited to '.functions')
-rw-r--r--.functions5
1 files changed, 5 insertions, 0 deletions
diff --git a/.functions b/.functions
index 5b7b8e3..97b0fca 100644
--- a/.functions
+++ b/.functions
@@ -18,6 +18,11 @@ 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
function json() {
if [ -p /dev/stdin ]; then