fix(shell): resolve all shellcheck warnings across scripts
- SC2088: replace ~ with $HOME in quoted strings (doctor.sh) - SC2010/SC2012: replace ls|grep with compgen -G globs (detect-plugins.sh) - SC2034: remove unused PKG and RED variables (install-plugins.sh, update-all.sh) - SC2015: convert A&&B||C to proper if/then/else (update-all.sh, install-plugins.sh, session-start.sh) - SC1090: add shellcheck source directive (statusline.sh) - SC2129: group redirects into single block (install-plugins.sh) 0 warnings remaining (3 SC1091 info-level expected). Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -161,7 +161,7 @@ printf "│ 📦 v%-45s│\n" "$CONFIG_VERSION"
|
||||
# Version check: compare local vs remote (non-blocking)
|
||||
_remote_ver=""
|
||||
if [ -n "$REPO_DIR" ] && [ -d "$REPO_DIR/.git" ]; then
|
||||
_remote_ver=$(cd "$REPO_DIR" 2>/dev/null && git fetch origin --quiet 2>/dev/null && git show origin/master:version.txt 2>/dev/null || true)
|
||||
_remote_ver=$(cd "$REPO_DIR" 2>/dev/null && git fetch origin --quiet 2>/dev/null && git show origin/master:version.txt 2>/dev/null) || _remote_ver=""
|
||||
fi
|
||||
if [ -n "$_remote_ver" ] && [ "$_remote_ver" != "$CONFIG_VERSION" ]; then
|
||||
printf "│ 🔄 update available: v%-27s│\n" "$_remote_ver"
|
||||
|
||||
@@ -21,6 +21,7 @@ BRANCH_STR="${BRANCH:+ ($BRANCH)}"
|
||||
# Plan detection (reuse shared lib)
|
||||
_lib="$(dirname "${BASH_SOURCE[0]}")/../lib/detect-plugins.sh"
|
||||
if [ -f "$_lib" ]; then
|
||||
# shellcheck source=../lib/detect-plugins.sh
|
||||
source "$_lib"
|
||||
PLAN=$(detect_plan 2>/dev/null || echo "pro")
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user