Correct ble.sh sourcing in bashrc? #254
-
I was just wondering if This is my #
# ~/.bashrc
#
[[ $- == *i* ]] && source /usr/share/blesh/ble.sh --noattach
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
alias ls='ls --color=auto'
PS1='[\u@\h \W]\$ '
### ================== [CUSTOM] ================== ###
# --------------> PATH variables <-------------- #
export EDITOR=micro
export VISUAL=micro
export GPG_TTY=$(tty)
# ---------------------------------------------- #
[[ ${BLE_VERSION-} ]] && ble-attach
#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" |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
I think I need to explain the general answer in detail somewhere, so let me write it here today. Actually, I think in most cases just writing When do we need to put
|
Beta Was this translation helpful? Give feedback.
-
Here are some comments on the provided example of
If you would check the interactive session by # If not running interactively, don't do anything
[[ $- != *i* ]] && return
source /usr/share/blesh/ble.sh --noattach
It depends on what |
Beta Was this translation helpful? Give feedback.
Here are some comments on the provided example of
.bashrc
: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 asIt depends on what
s…