Here's what the end result looks like:
To achieve that, simply change your PS1 variable in your profile or you shell rc file to the code below:
victor@Desktop:~ :) $ cd /tmp
victor@Desktop:/tmp :) $ ls 123 ls: cannot access 123: No such file or directory victor@Desktop:~ :( |
To achieve that, simply change your PS1 variable in your profile or you shell rc file to the code below:
PS1='\u@\h:\w `if [ $? = 0 ]; then echo \[\e[32m\]:\)\[\e[37m\]; else echo \[\e[31m\]:\(\[\e[37m\]; fi` $ '
|
No comments:
Post a Comment