dotfiles/bash/.bashrc

43 lines
1.1 KiB
Bash
Raw Normal View History

# if powerline-shell is available use it.
function _update_ps1() {
if hash powerline-rs 2>/dev/null; then
PS1="$(powerline-rs --shell bash $?)"
fi
}
# sourceIfExists
function sourceIfExists () {
[[ -f "$1" ]] && source "$1"
}
2017-12-06 18:30:31 +01:00
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
source ~/.alias
2018-07-02 22:16:18 +02:00
source ~/.custom
2019-06-19 08:26:06 +02:00
source ~/.variables
sourceIfExists ~/lib/azure-cli/az.completion
eval "$(thefuck --alias)"
2019-12-03 08:53:23 +01:00
# evals
eval $(keychain --eval --quiet ~/.ssh/id_rsa)
2019-12-03 08:53:23 +01:00
eval "$(pyenv init -)"
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
2018-07-02 22:16:18 +02:00
2021-02-03 17:09:38 +01:00
if hash dotnet 2>/dev/null; then
export DOTNET_ROOT=/usr/share/dotnet
export MSBuildSDKsPath=$DOTNET_ROOT/sdk/$(${DOTNET_ROOT}/dotnet --version)/Sdks
export PATH="${PATH}:${DOTNET_ROOT}:~/.dotnet/tools"
fi
2019-12-01 16:54:29 +01:00
2017-12-06 18:30:31 +01:00
PS1='[\u@\h \W]\$ '
if [[ $TERM != linux && ! $PROMPT_COMMAND =~ _update_ps1 ]]; then
PROMPT_COMMAND="_update_ps1; $PROMPT_COMMAND"
fi
2019-12-03 08:53:23 +01:00
export PATH=$PATH:/home/mastermindzh/bin