aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKylie McClain <kylie@somas.is>2020-07-11 10:11:49 -0400
committerKylie McClain <kylie@somas.is>2020-07-11 10:11:49 -0400
commit64d1c74880ff932af579fb4fd8af5fea99dc387d (patch)
tree17cfb05d8d459e5ea37ace7e0ed5f323a83f9ee0
parent634574932ef37333b8877480814f38ba11ecf2ef (diff)
downloadfilesystem-64d1c74880ff932af579fb4fd8af5fea99dc387d.tar.gz
filesystem-64d1c74880ff932af579fb4fd8af5fea99dc387d.tar.xz
filesystem-64d1c74880ff932af579fb4fd8af5fea99dc387d.zip
profile: only set PS1 if not already set
-rw-r--r--etc/profile12
1 files changed, 7 insertions, 5 deletions
diff --git a/etc/profile b/etc/profile
index f24cb2b..ff07ee1 100644
--- a/etc/profile
+++ b/etc/profile
@@ -23,9 +23,11 @@ case "$-" in
*) return ;;
esac
-PS1='$(id -un)@$(hostname) ${PWD} '
-case "$(id -u)" in
- 0) PS1="${PS1} # " ;;
- *) PS1="${PS1} $ " ;;
-esac
+if [ -z "${PS1}" ]; then
+ PS1='$(id -un)@$(hostname) ${PWD} '
+ case "$(id -u)" in
+ 0) PS1="${PS1} # " ;;
+ *) PS1="${PS1} $ " ;;
+ esac
+fi