Add JFrog CLI completion to shell profile

pull/115/head
Muhammad Atif Ali 2 years ago
parent 66891144c5
commit 04c2bcbfd5

@ -97,3 +97,14 @@ if [ "${CONFIGURE_CODE_SERVER}" == "true" ]; then
else
echo "🤔 Skipping JFrog extension installation. Set configure_code_server to true to install the JFrog extension."
fi
# Configure the JFrog CLI completion
echo "📦 Configuring JFrog CLI completion..."
jf completion $SHELL --install
# Append the completion script to the shell profile if its bash or zsh if it isn't already there.
if [ "$SHELL" = "/bin/bash" ] || [ "$SHELL" = "/bin/zsh" ]; then
if ! grep -q "source $HOME/.jfrog/jfrog_$${SHELL}_completion" ~/.$${SHELL}rc; then
echo "📦 Adding JFrog CLI completion to shell profile..."
echo "source $HOME/.jfrog/jfrog_$${SHELL}_completion" >> ~/.$${SHELL}rc
fi
fi

@ -97,3 +97,15 @@ if [ "${CONFIGURE_CODE_SERVER}" == "true" ]; then
else
echo "🤔 Skipping JFrog extension installation. Set configure_code_server to true to install the JFrog extension."
fi
# Configure the JFrog CLI completion
echo "📦 Configuring JFrog CLI completion..."
jf completion $SHELL --install
# Append the completion script to the shell profile if its bash or zsh if it isn't already there.
if [ "$SHELL" = "/bin/bash" ] || [ "$SHELL" = "/bin/zsh" ]; then
if ! grep -q "source $HOME/.jfrog/jfrog_$${SHELL}_completion" ~/.$${SHELL}rc; then
echo "📦 Adding JFrog CLI completion to shell profile..."
echo "source $HOME/.jfrog/jfrog_$${SHELL}_completion" >> ~/.$${SHELL}rc
fi
fi

Loading…
Cancel
Save