Created
May 8, 2014 16:58
-
-
Save ciaranmg/858271892024f63f0a86 to your computer and use it in GitHub Desktop.
Bash Profile with coloured Prompt
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
# Enable programmable completion features. | |
if [ -f /etc/bash_completion ]; then | |
source /etc/bash_completion | |
fi | |
# Set the PS1 prompt (with colors). | |
# Based on http://www-128.ibm.com/developerworks/linux/library/l-tip-prompt/ | |
# And http://networking.ringofsaturn.com/Unix/Bash-prompts.php . | |
#PS1='\n[\u@\h \! \w]\n\[\e[32m\]$ \[\e[0m\]' | |
#PS1='`whoami`@`hostname | sed 's/\..*//'` $ ' | |
PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h: \[\033[33;1m\]\w\[\033[m\] $ " | |
# Set the default editor to vim. | |
export EDITOR=vim | |
# Avoid succesive duplicates in the bash command history. | |
export HISTCONTROL=ignoredups | |
# Append commands to the bash command history file (~/.bash_history) | |
# instead of overwriting it. | |
shopt -s histappend | |
# Append commands to the history every time a prompt is shown, | |
# instead of after closing the session. | |
PROMPT_COMMAND='history -a' | |
# Add bash aliases. | |
if [ -f ~/.bash_aliases ]; then | |
source ~/.bash_aliases | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment