dotfiles/bash/.bashrc

39 lines
1.1 KiB
Bash
Raw Normal View History

2022-05-02 22:07:09 +02:00
#!/bin/bash
# sourceIfExists
2023-12-10 00:02:08 +01:00
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)"
eval "$(oh-my-posh init bash --config ~/.config/poshthemes/mastermindzh.yaml)"
2019-12-03 08:53:23 +01:00
2022-05-02 22:07:09 +02:00
# load keychain with private key
if test -f "$HOME/.ssh/id_ed25519"; then
2023-12-10 00:02:08 +01:00
eval "$(keychain --eval --quiet ~/.ssh/id_ed25519)"
2022-05-02 22:07:09 +02:00
else
2023-12-10 00:02:08 +01:00
# fallback to older rsa
eval "$(keychain --eval --quiet ~/.ssh/id_rsa)"
2022-05-02 22:07:09 +02:00
fi
2019-12-03 08:53:23 +01:00
eval "$(pyenv init -)"
export NVM_DIR="$HOME/.nvm"
2023-12-10 00:02:08 +01:00
[ -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
2023-12-10 00:02:08 +01:00
export DOTNET_ROOT=/usr/share/dotnet
export MSBuildSDKsPath=$DOTNET_ROOT/sdk/$(${DOTNET_ROOT}/dotnet --version)/Sdks
export PATH="${PATH}:${DOTNET_ROOT}:~/.dotnet/tools"
2021-02-03 17:09:38 +01:00
fi
2019-12-01 16:54:29 +01:00
2019-12-03 08:53:23 +01:00
export PATH=$PATH:/home/mastermindzh/bin