Last active
September 4, 2020 18:57
-
-
Save typelogic/e14c76dbe07ce18b097b675a853661b8 to your computer and use it in GitHub Desktop.
my PS1
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
getjavaversion() { | |
java -version 2>&1 | awk 'NR==1{gsub("\"","");print $3}' | |
} | |
is_uoc() { | |
[ -r .data/.m2/settings.xml ] && printf M | |
} | |
git_branch() { | |
[ -d .git ] && git branch --show-current | |
} | |
export PS1='\e[44;1;37m$(pwd) \e[42;1;37m`getjavaversion`\[\e[0;35m\]|\e[1;37m`is_uoc`\[\e[0;35m\]|\e[45;1;37m`git_branch`\[\e[0m\]\n$ ' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment