summaryrefslogtreecommitdiffstatshomepage
path: root/bashrc
blob: 2776451c3736f6ca16057879d494ca7d48bc62dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/env bash

export DOTFILES="${HOME}/dotfiles"

comp_dir=${XDG_DATA_HOME:-$HOME/.local/share}/bash-completion/completions

if [ -d "$comp_dir" ]; then for f in "$comp_dir"/*; do source $f; done; fi
if [ -d "~/.bash.d" ]; then for f in ~/.bash.d/*; do source $f; done; fi

source $DOTFILES/shell/env.sh
source $DOTFILES/shell/aliases.sh
[ -n "${WSL_DISTRO_NAME+1}" ] && source $DOTFILES/shell/wsl.sh
[ -n "${WSL_DISTRO_NAME+1}" ] && source $DOTFILES/shell/gpg.sh

eval "$(starship init bash)"

function set_win_title() {
    echo -ne "\033]0;$USER@$HOSTNAME: ${PWD/$HOME/'~'}\007"
}
starship_precmd_user_func="set_win_title"