summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2023-12-03 10:15:32 +0200
committerLars Wirzenius <liw@liw.fi>2023-12-03 10:15:32 +0200
commit87d34728903dfdf1f2d17ffaa48169758454840c (patch)
tree2628f1a429580410e41c2ef3fd6b51385e45bfcb
parentfb21c7fceab24c7ecd7a9aaf89e6203cf242a38e (diff)
downloadliw-dot-files-87d34728903dfdf1f2d17ffaa48169758454840c.tar.gz
bashrc: make a few assignments more safe
Signed-off-by: Lars Wirzenius <liw@liw.fi> Sponsored-by: author
-rw-r--r--bashrc5
1 files changed, 3 insertions, 2 deletions
diff --git a/bashrc b/bashrc
index 6d32737..431e010 100644
--- a/bashrc
+++ b/bashrc
@@ -104,7 +104,8 @@ wrap_if_nonempty() {
define_ps1() {
termattr bold blue
date +%H:%M | tr -d '\n'
- local hostname="$(hostname)"
+ local hostname
+ hostname="$(hostname)"
case "$hostname" in
exolobe3)
printf ' \w '
@@ -217,5 +218,5 @@ if [ -e "$HOME/.cargo/env" ]; then
fi
if command -v pathdedup >/dev/null; then
- export PATH="$(pathdedup)"
+ PATH="$(pathdedup)"
fi