Skip to content

Instantly share code, notes, and snippets.

@carlohcs
Last active February 14, 2016 13:08
Show Gist options
  • Save carlohcs/c0091ed009e36e51e6ef to your computer and use it in GitHub Desktop.
Save carlohcs/c0091ed009e36e51e6ef to your computer and use it in GitHub Desktop.
# Setup a better visual information at terminal line
HOST='\[\033[02;36m\]\h'; HOST=' '$HOST
TIME='\[\033[01;31m\]\t \[\033[01;32m\]'
LOCATION=' \[\033[01;34m\]`pwd | sed "s#\(/[^/]\{1,\}/[^/]\{1,\}/[^/]\{1,\}/\).*\(/[^/]\{1,\}/[^/]\{1,\}\)/\{0,1\}#\1_\2#g"`'
BRANCH=' \[\033[00;33m\]$(git_branch)\[\033[00m\]\n\$ '
PS1=$TIME$USER$HOST$LOCATION$BRANCH
PS2='\[\033[01;36m\]>'
# Automplete for linux commands
if [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
@carlohcs
Copy link
Author

My ~/.bashrc file

This code add custom configurations to the bash.

You can see some features in above image.

linux-bash-new

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment