Last active
March 4, 2019 10:27
-
-
Save Habetdin/c22007ca85317f9b29551e9272db5bb4 to your computer and use it in GitHub Desktop.
Bash Tweaks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# don't put duplicate lines or lines starting with space in the history | |
HISTCONTROL=ignoreboth:erasedups | |
# append to the history file, don't overwrite it | |
shopt -s histappend | |
# don't execute expanded result immediately | |
shopt -s histverify | |
# https://unix.stackexchange.com/a/18443 | |
PROMPT_COMMAND="history -n; history -w; history -c; history -r; $PROMPT_COMMAND" | |
if [ -z "$TMUX" ]; then | |
if [[ $- =~ i ]] && shopt -q login_shell; then | |
#[[ $(ps -p $PPID -o comm=) =~ sshd ]] && \ | |
tmux attach || tmux new | |
fi | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment