Last active
August 29, 2015 14:24
-
-
Save MTN-RowinAndruscavage/58e65c1030034d46f9fc to your computer and use it in GitHub Desktop.
BASH prompt
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
| PS1=$'\[\033[01;36;44m\]# $( EC=$?; [ $EC -eq 0 ] && echo -n "\[\033[01;32;44m\]Exit:$EC" || echo -n "\[\033[00;31;44m\]Exit:$EC" ) \ | |
| \[\033[00;37;44m\]$(date +%Y-%m-%d\ %H:%M:%S) \[\033[01;34;49m\] \ | |
| \[\033[01;30;49m\][\[\033[00;35;49m\]\u\[\033[01;30;49m\]@\[\033[01;34;49m\]\h\[\033[01;30;49m\]:\ | |
| \[\033[00;33;49m\]\w\[\033[00;36;49m\]\[\033[01;30;49m\]]\[\033[01;34;49m\]\n\ | |
| \[\033[01;36;49m\]\$\[\033[01;30;49m\](: !\! )\[\033[00;00;00m\] ' | |
| # If this is an xterm set the title to user@host:dir | |
| case "$TERM" in | |
| xterm*|rxvt*) | |
| PS1="\[\e]0;\W\a\]$PS1" | |
| ;; | |
| *) | |
| ;; | |
| esac | |
| ## bash history tweaks from http://blog.sanctum.geek.nz/better-bash-history/ | |
| HISTFILESIZE=1000000 | |
| HISTSIZE=1000000 | |
| HISTCONTROL=ignoreboth | |
| HISTIGNORE='ls:bg:fg:history' | |
| HISTTIMEFORMAT=$'\033[01;30;49m%F %T\033[00;00;00m ' | |
| shopt -s histappend |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sample: http://imgur.com/zgWA4BG
Nothing fancy, just addresses a few things that annoy me about standard prompts: