aboutsummaryrefslogtreecommitdiff
path: root/etc/sh/root-rc
diff options
context:
space:
mode:
Diffstat (limited to 'etc/sh/root-rc')
-rw-r--r--etc/sh/root-rc8
1 files changed, 6 insertions, 2 deletions
diff --git a/etc/sh/root-rc b/etc/sh/root-rc
index a803b11..f78f293 100644
--- a/etc/sh/root-rc
+++ b/etc/sh/root-rc
@@ -1,3 +1,5 @@
+#!/bin/sh
+# shellcheck disable=1090,1091
export ENV=~/.profile
XDG_PREFIX=~/.usr
@@ -63,10 +65,12 @@ error_marker() {
}
shell_level() {
+ # shellcheck disable=3028
+ L="${SHLVL:-1}"
if [ -n "${TMUX:-}" ]; then
- LVL=$((SHLVL - 1))
+ LVL=$((L - 1))
else
- LVL="$SHLVL"
+ LVL="$L"
fi
if [ "$LVL" != 1 ]; then
printf '[%s] ' "$LVL"