summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2020-02-27 12:00:14 -0800
committerBen Sima <ben@bsima.me>2020-02-27 12:00:14 -0800
commit711493cff783f0866d2cbf10c8f3846a7557c7c3 (patch)
tree21e7792634f040c642e8d07a179d3d5087aeff30 /lib
parentbd7a7d686946c5fc373123e97db544c8e4a82d76 (diff)
Add return code to bash prompt
Diffstat (limited to 'lib')
-rw-r--r--lib/common.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/common.nix b/lib/common.nix
index 3ace1d3..ea1e420 100644
--- a/lib/common.nix
+++ b/lib/common.nix
@@ -136,7 +136,7 @@ in
}
# my prompt, after much chagrin
- export PS1='\n\[\e[34m\][\u@\h:\w]\[\e[m\] $(date +%Y.%m.%d..%H.%M) \n$ '
+ export PS1="\n\[\e[34m\][\u@\h:\w]\[\e[m\] $(date +%Y.%m.%d..%H.%M) \$(if [ \$? == 0 ]; then true; else echo \(\$?\); fi) \n$ "
'';
shellAliases = {
add = "git add --ignore-removal";