Created
February 24, 2014 07:26
-
-
Save h14i/9183369 to your computer and use it in GitHub Desktop.
direnv sub-commands completion for zsh. inspired https://gist.github.com/yonchu/5005758
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#compdef direnv | |
# setopt -eu | |
function _direnv { | |
local direnv | |
local -a comp_list | |
direnv="\ | |
allow[Grants direnv to load the given .envrc] | |
deny[Revokes the auhorization of a given .envrc] | |
edit[Edits .envrc] | |
help[shows this help] | |
hook[Used to setup the shell hook] | |
reload[triggers an env reload] | |
status[prints some debug status informations] | |
stdlib[Displays the stdlib available in the .envrc execution context]" | |
comp_list=( ${(f)direnv} ) | |
_values 'direnv subcmds' "$comp_list[@]" | |
} | |
_direnv "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
恐らくyonchuさんの_httpstatusを参考にしたと思われる。
forkしたほうが良かったかな…。