From 3789814ecfdf3a7aeadb6cd8c13b4e21a03fc6fa Mon Sep 17 00:00:00 2001 From: yahavi Date: Tue, 14 Jan 2020 17:12:01 +0200 Subject: [PATCH] Allow 'go-generate' of completion scripts --- build.sh | 2 -- completion/shells/bash/jfrog | 10 ---------- completion/shells/zsh/jfrog | 10 ---------- 3 files changed, 22 deletions(-) delete mode 100755 completion/shells/bash/jfrog delete mode 100755 completion/shells/zsh/jfrog diff --git a/build.sh b/build.sh index ab29143bb..fcc3dea42 100755 --- a/build.sh +++ b/build.sh @@ -1,7 +1,5 @@ #!/bin/bash -go generate ./completion/shells/... - if [ $# -eq 0 ] then exe_name="jfrog" diff --git a/completion/shells/bash/jfrog b/completion/shells/bash/jfrog deleted file mode 100755 index ddf12ee7f..000000000 --- a/completion/shells/bash/jfrog +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -_jfrog() { - local cur opts base - COMPREPLY=() - cur="${COMP_WORDS[COMP_CWORD]}" - opts=$( ${COMP_WORDS[@]:0:$COMP_CWORD} --generate-bash-completion ) - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) -} - -complete -F _jfrog -o default jfrog diff --git a/completion/shells/zsh/jfrog b/completion/shells/zsh/jfrog deleted file mode 100755 index 064ffa2db..000000000 --- a/completion/shells/zsh/jfrog +++ /dev/null @@ -1,10 +0,0 @@ -_jfrog() { - local -a opts - opts=("${(@f)$(_CLI_ZSH_AUTOCOMPLETE_HACK=1 ${words[@]:0:#words[@]-1} --generate-bash-completion)}") - _describe 'values' opts - if [[ $compstate[nmatches] -eq 0 && $words[$CURRENT] != -* ]]; then - _files - fi -} - -compdef _jfrog jfrog \ No newline at end of file