diff options
author | sanmiguel <[email protected]> | 2017-02-18 14:41:11 +0100 |
---|---|---|
committer | sanmiguel <[email protected]> | 2017-02-18 14:41:11 +0100 |
commit | 0adce8690bd703d08c4c1af6d19d67ab78ff8bd8 (patch) | |
tree | 75a317375e95a199101010d72e298552183be8c6 /zsh_completion/_kerl | |
parent | 7ec1f8e0463b99ada8cc85de098b7aa9e6ab3f04 (diff) | |
parent | 0daeaa064d20dd3f72d4df6c105deba8e24c4543 (diff) | |
download | kerl-0adce8690bd703d08c4c1af6d19d67ab78ff8bd8.tar.gz kerl-0adce8690bd703d08c4c1af6d19d67ab78ff8bd8.tar.bz2 kerl-0adce8690bd703d08c4c1af6d19d67ab78ff8bd8.zip |
Merge branch 'get_active_path-cli' into enable-travis-ci
Diffstat (limited to 'zsh_completion/_kerl')
-rw-r--r-- | zsh_completion/_kerl | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/zsh_completion/_kerl b/zsh_completion/_kerl index e58eb8b..7c9f0d6 100644 --- a/zsh_completion/_kerl +++ b/zsh_completion/_kerl @@ -30,6 +30,10 @@ _kerl_installations() { installations=(${(f)"$(_call_program installations kerl list installations 2>/dev/null | cut -f 2 -d " ")"}) } +_kerl_installnames() { + installnames=(${(f)"$(_call_program installations kerl list installations 2>/dev/null | cut -f 2 -d " " | xargs basename)"}) +} + local -a _1st_arguments _1st_arguments=( 'build:Build specified release or git repository' @@ -39,6 +43,7 @@ _1st_arguments=( 'list:List releases, builds and installations' 'delete:Delete builds and installations' 'active:Print the path of the active installation' + 'path:Print the path of any installation' 'status:Print available builds and installations' 'prompt:Print a string suitable for insertion in prompt' 'cleanup:Remove compilation artifacts (use after installation)' @@ -96,6 +101,15 @@ case "$words[1]" in # TODO: suggest starting location of "$KERLDIR/$(lowercase $build)" _directories ;; + path) + _arguments \ + '1: :->installnames' && return 0 + if [[ "$state" == installnames ]]; then + _kerl_installnames + _wanted installnames expl '' compadd -a installnames + return + fi + ;; deploy) _arguments \ '1: :->hosts' \ |