dotfiles

Obligatory dotfiles repo
git clone git://git.danielmoch.com/dotfiles.git
Log | Files | Refs

commit 57dcb8e583392dca811c82cd63d7b3c560420a99
parent b0f1782d6b42e359ddca3f827ffa93174cc85e4c
Author: Daniel Moch <daniel@danielmoch.com>
Date:   Mon, 30 Sep 2019 20:51:32 -0400

Add $? to $PS1 if previous command failed

Diffstat:
M.shrc | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/.shrc b/.shrc @@ -8,6 +8,8 @@ set -o emacs printf "\033]0;$LOGNAME@$HOSTNAME\007" __ps1() { + last=$? + [ $last -ne 0 ] && echo -n "[$last] " echo -n $LOGNAME@$HOSTNAME: if [ "$PWD" = "$HOME" ] then