Last active
March 18, 2019 12:25
-
-
Save maurofaccenda/b9c151b5af32676de960eb3ef1c2b2af to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# enable colored output | |
alias ls='ls -G' | |
alias grep='grep --color' | |
# ask for confirmation on destructive operation | |
alias cp='cp -i' | |
alias mv='mv -i' | |
alias rm='rm -i' | |
# history management | |
shopt -s histappend | |
shopt -s cmdhist | |
HISTFILESIZE=1000000 | |
HISTSIZE=1000000 | |
HISTCONTROL=ignoreboth | |
HISTIGNORE='ls:bg:fg:history' | |
HISTTIMEFORMAT='%F %T ' | |
PROMPT_COMMAND='history -a' | |
# prompt configuration | |
CUSTOM_PROMPT='\[\033[38;5;10m\]\u@\h\[$(tput sgr0)\] \[\033[38;5;12m\]\W \$ \[$(tput sgr0)\]' | |
# prepends the prompt with the poop emoji when previous command failed | |
PS1="\$(test \$? != 0 && echo '💩 ')$CUSTOM_PROMPT" | |
# fix iTerm2 title bar not being updated after disconnecting from a SSH session | |
PROMPT_COMMAND="echo -ne '\033]0;${USER}@$(hostname -s)\007';$PROMPT_COMMAND" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment