-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathbashrc
36 lines (30 loc) · 1.29 KB
/
bashrc
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
# promt
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
source $HOME/.dotfiles/shellrc
# better history settings
export HISTFILE=$HOME/.local/share/bash/bash_history
shopt -s histappend # Append history instead of rewriting it
shopt -s cmdhist # Use one command per line
HISTCONTROL="erasedups:ignoreboth" # Avoid duplicate entries
HISTFILESIZE=1000000 # Allow a larger history file
HISTSIZE=1000000 # Allow a larger history file
HISTTIMEFORMAT='%F %T ' # Record timestamps
PROMPT_COMMAND='history -a' # Store history immediately
# Perform file completion in a case insensitive fashion
bind "set completion-ignore-case on"
# Treat hyphens and underscores as equivalent
bind "set completion-map-case on"
# Display matches for ambiguous patterns at first tab press
bind "set show-all-if-ambiguous on"
case "$(uname -s)" in
Linux)
# Load grc
[[ -s "/etc/profile.d/grc.bashrc" ]] && source /etc/profile.d/grc.bashrc
;;
Darwin)
# Load iTerm2 shell integration
[[ -s "~/.local/share/bash/iterm2_shell_integration.bash" ]] && source "~/.local/share/bash/iterm2_shell_integration.bash"
# Load grc
[[ -s "`brew --repository`/etc/grc.bashrc" ]] && source "`brew --repository`/etc/grc.bashrc"
;;
esac