aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorMitch Riedstra <mitch@riedstra.us>2019-09-14 20:17:46 -0400
committerMitch Riedstra <mitch@riedstra.us>2019-09-14 20:17:46 -0400
commitf61ff042ffd3a8ba45550ded7be841ff76dc4474 (patch)
treef3ad6014bf31f62c7fa938424e1b799d5ae40690 /shell
parentc61145f082e988d08828af979ac5d37ea340076f (diff)
downloaddotfiles-f61ff042ffd3a8ba45550ded7be841ff76dc4474.tar.gz
dotfiles-f61ff042ffd3a8ba45550ded7be841ff76dc4474.tar.xz
Don't try to do any funky prompt nonsense if the shell isn't interactive
Diffstat (limited to 'shell')
-rw-r--r--shell/ash7
1 files changed, 7 insertions, 0 deletions
diff --git a/shell/ash b/shell/ash
index 638c58a..0301066 100644
--- a/shell/ash
+++ b/shell/ash
@@ -3,6 +3,9 @@ set_pager
set_editor
setaliases
+case "$-" in
+*i*)
+
set_ash_title() {
_load="Load Avg: $(_sys_load)"
_free_mem="M Free: $(free -m | sed -n 2p | awk '{print $3}')"
@@ -21,3 +24,7 @@ export PS1="\[\`set_ash_title\`\]\`nonzero_return\`[\t] <\u@\H> \w \\$ "
if [ $(id -u) -eq 0 ] ; then
export PS1="\[\`set_ash_title\`\]\`nonzero_return\`[\t] <\[\e[31m\]\u\[\e[m\]\[\e[31m\]@\[\e[m\]\[\e[31m\]\H\[\e[m\]> \w \\$ "
fi
+
+;;
+*) return ;;
+esac