summaryrefslogtreecommitdiff
path: root/step-cli/zsh_autocomplete
diff options
context:
space:
mode:
Diffstat (limited to 'step-cli/zsh_autocomplete')
-rw-r--r--step-cli/zsh_autocomplete13
1 files changed, 13 insertions, 0 deletions
diff --git a/step-cli/zsh_autocomplete b/step-cli/zsh_autocomplete
new file mode 100644
index 000000000..ffb9f9bea
--- /dev/null
+++ b/step-cli/zsh_autocomplete
@@ -0,0 +1,13 @@
+#compdef step
+
+function _step {
+ local -a opts
+ opts=("${(@f)$(_CLI_ZSH_AUTOCOMPLETE_HACK=1 ${words[@]:0:#words[@]-1} --generate-bash-completion)}")
+ if [[ "${opts}" != "" ]]; then
+ _describe -t step-commands 'values' opts
+ else
+ _path_files
+ fi
+}
+
+_step "$@"