Created
July 6, 2012 13:30
-
-
Save nedmas/3060155 to your computer and use it in GitHub Desktop.
Script to force enable color prompt on Ubuntu and other Linux distros.
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
#!/bin/bash | |
# Get the path for the .bashrc file from the prompt or set it as being in the users home dir. | |
BASHRC="${1:=~/.bashrc}" | |
# Use sed to remove the comment from the force color line in the .bashrc file. | |
sed -i 's/#force_color_prompt=yes/force_color_prompt=yes/g' $BASHRC | |
# BONUS: Uncomment to change the default color of the prompt. | |
#sed -i 's/1;32m/1;31m/g' | |
# Reload the .bashrc file | |
source BASHRC |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment