aboutsummaryrefslogtreecommitdiffstats
path: root/zsh_completion/_kerl
diff options
context:
space:
mode:
authorMark Allen <[email protected]>2017-02-20 15:17:52 -0600
committerGitHub <[email protected]>2017-02-20 15:17:52 -0600
commit485323434eb3992dacb6442177a7d848b82af113 (patch)
tree602f163f7ead50cf5795302136d07767e907d1dc /zsh_completion/_kerl
parent69579330e765ff2a97e75d04ba0a4d0ebedf23d0 (diff)
parent23acfaba005c2dade4c80ccdb98fd27fab95ea9a (diff)
downloadkerl-485323434eb3992dacb6442177a7d848b82af113.tar.gz
kerl-485323434eb3992dacb6442177a7d848b82af113.tar.bz2
kerl-485323434eb3992dacb6442177a7d848b82af113.zip
Merge pull request #183 from kerl/enable-travis-ci
Enable travis-CI, add 'kerl path' subcommand
Diffstat (limited to 'zsh_completion/_kerl')
-rw-r--r--zsh_completion/_kerl14
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' \