-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbashrc
32 lines (26 loc) · 1.1 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
# Preserve bash history in multiple terminal windows
# https://unix.stackexchange.com/questions/1288/preserve-bash-history-in-multiple-terminal-windows
HISTCONTROL=ignoredups:erasedups
shopt -s histappend
PROMPT_COMMAND="${PROMPT_COMMAND:+$PROMPT_COMMAND$'\n'}history -a; history -c; history -r"
# Entering tmux https://unix.stackexchange.com/a/113768
if command -v tmux &> /dev/null && [ -n "$PS1" ] && [[ ! "$TERM" =~ screen ]] && [[ ! "$TERM" =~ tmux ]] && [ -z "$TMUX" ]; then
exec tmux new-session -A -s lubos
fi
# Tmux (possible fix for copy in terminal)
export EDITOR='vim'
export VISUAL='vim'
export TERM='xterm-256color'
# FZF history, use CTRL-P
export FZF_DEFAULT_OPTS="--history=$HOME/.fzf_history"
# MYSQL default password for containers
export MYSQL_PWD='secret'
# CMD starts with username and full hostname
export PS1='\[\033[0;32m\]\u@$(hostname -f):\[\033[36m\]\W\[\033[0m\] \$ '
# Aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
alias dc='docker-compose'
alias mailhog='docker run -d --name="mailhog" --restart="always" -p 1025:1025 -p 8025:8025 mailhog/mailhog'
alias open='xdg-open'