From 8cf7ac48170f22db1187e8e2aeb051c369b1eb0e Mon Sep 17 00:00:00 2001 From: Ahmed Abdelhalim Date: Fri, 5 May 2023 15:58:56 +0200 Subject: Add jf completion section to bash_profile --- .bash_profile | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.bash_profile b/.bash_profile index c32671a..02fa6ba 100644 --- a/.bash_profile +++ b/.bash_profile @@ -134,3 +134,16 @@ if command -v java 1>/dev/null 2>&1; then export PATH="/opt/homebrew/opt/openjdk@11/bin:$PATH" export PATH="/opt/homebrew/opt/gradle@6/bin:$PATH" fi + +# ==== JFrog CLI config +if command -v jf 1>/dev/null 2>&1; then + _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 + complete -F _jfrog -o default jf +fi -- cgit v1.2.3