Skip to content

Instantly share code, notes, and snippets.

@DirkyJerky
Last active August 29, 2015 14:15
Show Gist options
  • Save DirkyJerky/8d2578bf88fe50ad3474 to your computer and use it in GitHub Desktop.
Save DirkyJerky/8d2578bf88fe50ad3474 to your computer and use it in GitHub Desktop.
Showing last command exit status in my PS1
if [[ "$1" == "0" ]];
then echo -n $(tput setaf 2);
else echo -n $(tput setaf 1);
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment