Skip to content

Instantly share code, notes, and snippets.

@LespiletteMaxime
Created December 4, 2012 14:20
Show Gist options
  • Save LespiletteMaxime/4204387 to your computer and use it in GitHub Desktop.
Save LespiletteMaxime/4204387 to your computer and use it in GitHub Desktop.
[BASH] bashrc
## Mon bashrc ##
# Color the hostname
#if [ $HOSTNAME = 'maxime' ]; then
# export HOST_COLOR="\[\033[1;36m\]"
#fi
#if [ $HOSTNAME = 'marvin' ]; then
# export HOST_COLOR="\[\033[1;34m\]"
#fi
#if [ $HOSTNAME = 'leonidas' ]; then
# export HOST_COLOR="\[\033[1;31m\]"
#fi
# Color the colon red if root
#COLON_COLOR='0m'
#if [ ${UID} -eq 0 ]; then
# COLON_COLOR='1;31m'
#fi
#PS1=`echo -ne "$HOST_COLOR\h\[\033[00m\]\[\e[$COLON_COLOR\]:\[\033[01;32m\]\w\[\033[00m\]\\[\033[01;33m\]\$\[\033[00m\] "`
#PROMPT_COMMAND='PS1="\[\033[0;33m\][\!]\`if [[ \$? = "0" ]]; then echo "\\[\\033[32m\\]"; else echo "\\[\\033[31m\\]"; fi\`[\u.\h: \`if [[ `pwd|wc -c|tr -d " "` > 18 ]]; then echo "\\W"; else echo "\\w"; fi\`]\$\[\033[0m\] "; echo -ne "\033]0;`hostname -s`:`pwd`\007"'
#PS1='\[\e[1;32m\]\u@\H:\[\e[m\] \[\e[1;37m\]\w\[\e[m\]\n\[\e[1;33m\]hist:\! \[\e[0;33m\] \[\e[1;31m\]jobs:\j \$\[\e[m\] '
PS1="\n\[\e[30;1m\]\[\016\]l\[\017\](\[\e[34;1m\]\u@\h\[\e[30;1m\])-(\[\e[34;1m\]\j\[\e[30;1m\])-(\[\e[34;1m\]\@ \d\[\e[30;1m\])->\[\e[30;1m\]\n\[\016\]m\[\017\]-(\[\[\e[32;1m\]\w\[\e[30;1m\])-(\[\e[32;1m\]\$(/bin/ls -1 | /usr/bin/wc -l | /bin/sed 's: ::g') files, \$(/bin/ls -lah | /bin/grep -m 1 total | /bin/sed 's/total //')b\[\e[30;1m\])--> \[\e[0m\]"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment