aboutsummaryrefslogtreecommitdiffstats
path: root/src/_httpie
diff options
context:
space:
mode:
authorVincent Breitmoser <valodim@mugenguild.com>2013-11-05 17:57:17 +0100
committerVincent Breitmoser <valodim@mugenguild.com>2013-11-06 16:53:56 +0100
commit15690458fd27107ffafd2e146abd7f6cbcdc30ee (patch)
tree680432f40b334fa0884790815cc96acc4ce52b88 /src/_httpie
parentMerge pull request #184 from glidenote/add_httpie_completion (diff)
downloadzsh-completions-15690458fd27107ffafd2e146abd7f6cbcdc30ee.tar
zsh-completions-15690458fd27107ffafd2e146abd7f6cbcdc30ee.tar.gz
zsh-completions-15690458fd27107ffafd2e146abd7f6cbcdc30ee.tar.bz2
zsh-completions-15690458fd27107ffafd2e146abd7f6cbcdc30ee.tar.lz
zsh-completions-15690458fd27107ffafd2e146abd7f6cbcdc30ee.tar.xz
zsh-completions-15690458fd27107ffafd2e146abd7f6cbcdc30ee.tar.zst
zsh-completions-15690458fd27107ffafd2e146abd7f6cbcdc30ee.zip
_httpie: method is first argument, always
Diffstat (limited to 'src/_httpie')
-rw-r--r--src/_httpie9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/_httpie b/src/_httpie
index 439c301..68fd419 100644
--- a/src/_httpie
+++ b/src/_httpie
@@ -10,17 +10,13 @@
# -------
#
# * Akira Maeda <https://github.com/glidenote>
+# * Valodim <https://github.com/Valodim>
#
# ------------------------------------------------------------------------------
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
# vim: ft=zsh sw=2 ts=2 et
# ------------------------------------------------------------------------------
-local -a _method
-_method=(GET POST PUT DELETE HEAD OPTIONS TRACE CONNECT PATCH LINK UNLINK)
-
-_describe -t commands 'METHOD' _method || compadd "$@"
-
_httpie_urls() {
local expl
compset -S '[^:]*'
@@ -56,4 +52,5 @@ _arguments -C -s \
"--version[show program's version number and exit.]" \
'--traceback[Prints exception traceback should one occur.]' \
'--debug[Prints exception traceback should one occur and other information useful for debugging HTTPie itself.]' \
- '*:URL:_httpie_urls' && return 0
+ '1:method:(GET POST PUT DELETE HEAD OPTIONS TRACE CONNECT PATCH LINK UNLINK)' \
+ '*:URL:_httpie_urls' && return 0