~mehdix/dotfiles

ref: 2cbfc2b0317fa6462c676d62ae80949a6aad4696 dotfiles/.bashrc -rw-r--r-- 1.1 KiB
2cbfc2b0Mehdi Sadeghi Add kanshi config. 9 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# .bashrc
[ -n "$ENV" ] && . "$ENV" || ([ -e ~/.env ] && . ~/.env)

PS1='\[\033[1;33m\]$(prompt)\[\033[0m\]'
HISTCONTROL=ignoreboth:erasedups
HISTIGNORE="gst"
# see man strftime
HISTTIMEFORMAT="%F "

# Uncomment this line and remove `histappend' to enable shared history.
PROMPT_COMMAND="${PROMPT_COMMAND:+$PROMPT_COMMAND$'\n'}history -a; history -c; history -r;"
#shopt -s histappend

# See Bash manual
_completion_loader()
{
	# Completion files on Arch
	. "/usr/share/bash-completion/completions/$1" >/dev/null 2>&1 && return 124
}
complete -D -F _completion_loader -o bashdefault -o default

# Load if available
[ -f ~/.fzf.bash ] && . ~/.fzf.bash
[ -f ~/.config/broot/launcher/bash/br ] && . ~/.config/broot/launcher/bash/br
[ -f ~/.local/src/z.sh ] && . ~/.local/src/z.sh

# direnv hook
_direnv_hook() {
  local previous_exit_status=$?;
  trap -- '' SIGINT;
  eval "$("/usr/bin/direnv" export bash)";
  trap - SIGINT;
  return $previous_exit_status;
};

if ! [[ "${PROMPT_COMMAND:-}" =~ _direnv_hook ]]; then
  PROMPT_COMMAND="_direnv_hook${PROMPT_COMMAND:+;$PROMPT_COMMAND}"
fi