From a317496a280d37bdc59270b6b84ede73835c3d79 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Wed, 16 Nov 2022 21:29:25 -0300 Subject: etc/sh/root-rc: Fix ShellCheck warnings --- etc/sh/root-rc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'etc/sh/root-rc') 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" -- cgit v1.2.3