Skip to content

Correct ble.sh sourcing in bashrc? #254

Answered by akinomyoga
telometto asked this question in Q&A
Discussion options

You must be logged in to vote

Here are some comments on the provided example of .bashrc:


[[ $- == *i* ]] && source /usr/share/blesh/ble.sh --noattach

# If not running interactively, don't do anything
[[ $- != *i* ]] && return

If you would check the interactive session by [[ $- != *i* ]] && return, then you can actually do not need [[ $- == *i* ]] && before the sourcing ble.sh. You can write it as

# If not running interactively, don't do anything
[[ $- != *i* ]] && return

source /usr/share/blesh/ble.sh --noattach

#THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!!
export SDKMAN_DIR="$HOME/.sdkman"
[[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]] && source "$HOME/.sdkman/bin/sdkman-init.sh"

It depends on what s…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@telometto
Comment options

Answer selected by telometto
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants