aboutsummaryrefslogtreecommitdiff
path: root/etc/sh/root-rc
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2022-11-16 21:29:25 -0300
committerEuAndreh <eu@euandre.org>2022-11-16 21:29:25 -0300
commita317496a280d37bdc59270b6b84ede73835c3d79 (patch)
tree1f488af9366255d78c3b04731becded9d58c6a93 /etc/sh/root-rc
parentetc/guix/system.scm: Add network instability tolerance to OpenSSH daemon (diff)
downloaddotfiles-a317496a280d37bdc59270b6b84ede73835c3d79.tar.gz
dotfiles-a317496a280d37bdc59270b6b84ede73835c3d79.tar.xz
etc/sh/root-rc: Fix ShellCheck warnings
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"