Last active
June 1, 2018 03:59
-
-
Save viniciusban/25117f6221c6e0b2a70f4cbb6a783968 to your computer and use it in GitHub Desktop.
Basic .bash_aliases for virtual machines
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
# PS 1 green when $? is zero. Otherwise, red showing $?. | |
# Example: | |
# - [@virtualmachine:~/Documents]$ # <-- green | |
# - [ 127 @virtualmachine:~/Documents]$ # <-- red | |
PS1='[${debian_chroot:+($debian_chroot)}$(RC=$?;GREEN="\[\033[0;32m\]";RED="\[\033[0;31m\]";[ $RC -eq 0 ] && echo ${GREEN} || echo "${RED} ${RC} ")@\h\[\033[00m\]:\[\033[00;90m\]\w\[\033[00m\]]\$ ' | |
set -o vi | |
unalias ls |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment