diff --git a/plugins/curl/README.md b/plugins/curl/README.md index de1ca78a..8e70ad7e 100644 --- a/plugins/curl/README.md +++ b/plugins/curl/README.md @@ -2,4 +2,11 @@ ## Functions explained + * curlj - pretty json (require Python 2.6) + ## Aliases explained + + * curlh - show header only + * curls - download filename + * curlt - show response time in milliseconds + * curlrc - show http code diff --git a/plugins/curl/curl.plugin.zsh b/plugins/curl/curl.plugin.zsh index eb671dd9..90774d05 100644 --- a/plugins/curl/curl.plugin.zsh +++ b/plugins/curl/curl.plugin.zsh @@ -1,5 +1,10 @@ -alias jcurl=jsoncurl +alias curlj=jsoncurl function jsoncurl() { curl -s $1 |python -m json.tool } + +alias curlh="curl -siv -o /dev/null" +alias curls="curl -O" +alias curlt="curl -o /dev/null -s -w %{time_total}'\\n'" +alias curlrc="curl -s -o /dev/null -w %{http_code}'\\n'"