mirror of
https://github.com/lloeki/dotfiles.git
synced 2025-12-06 07:24:39 +01:00
66 lines
1.4 KiB
Bash
66 lines
1.4 KiB
Bash
## bashrc, called for interactive shells
|
|
|
|
[[ -z "$DOTFILES_ROOT_DIR" ]] && source "$HOME/.dotfilesrc"
|
|
|
|
source $DOTFILES_SHELL_DIR/aliases
|
|
source $DOTFILES_BASH_DIR/ext
|
|
source $DOTFILES_BASH_DIR/ansi
|
|
source $DOTFILES_BASH_DIR/prompt
|
|
source $DOTFILES_BASH_DIR/history
|
|
source $DOTFILES_BASH_DIR/term_title
|
|
source $DOTFILES_BASH_DIR/completion
|
|
source $DOTFILES_SHELL_DIR/go
|
|
source $DOTFILES_SHELL_DIR/chruby
|
|
source $DOTFILES_BASH_DIR/fzf
|
|
source $DOTFILES_SHELL_DIR/direnv
|
|
source $DOTFILES_SHELL_DIR/kd
|
|
source $DOTFILES_BASH_DIR/kitty
|
|
|
|
source $DOTFILES_SHELL_DIR/git_prompt_info
|
|
GIT_PS1_SHOWDIRTYSTATE=1
|
|
GIT_PS1_SHOWSTASHSTATE=1
|
|
GIT_PS1_SHOWUNTRACKEDFILES=1
|
|
|
|
precmd() {
|
|
CMD_RC=$?
|
|
|
|
# if [[ -n ${CMD_START} ]]; then
|
|
# CMD_END="${EPOCHREALTIME}"
|
|
# CMD_DURATION=$(bc <<<"${CMD_END} - ${CMD_START}")
|
|
# unset CMD_START
|
|
# unset CMD_END
|
|
# fi
|
|
|
|
_direnv_hook
|
|
#clear_incomplete_line
|
|
set_prompt
|
|
apply_prompt_rprompt
|
|
update_terminal_cwd
|
|
set_term_title
|
|
}
|
|
|
|
preexec() {
|
|
set_term_title
|
|
CMD_START="${EPOCHREALTIME}"
|
|
}
|
|
|
|
chpwd() {
|
|
__git_ps1_gitdir
|
|
_gopath
|
|
_auto-chruby
|
|
}
|
|
chpwd
|
|
|
|
# Make bash check its window size after a process completes
|
|
shopt -s checkwinsize
|
|
|
|
# easy on spelling mistakes
|
|
shopt -s cdspell
|
|
|
|
# turn off distractive bells
|
|
set bell-style none
|
|
|
|
# disable deprecation warning
|
|
export BASH_SILENCE_DEPRECATION_WARNING=1
|
|
|
|
# vim: ft=bash
|