From 656f61e21be6e2f1f4abb456a845340412e8b8a0 Mon Sep 17 00:00:00 2001 From: Ian Kelling Date: Thu, 27 Jul 2023 03:04:48 -0400 Subject: [PATCH] minor enhancement for shellchecking things --- brc | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/brc b/brc index a29651b..afb73f1 100644 --- a/brc +++ b/brc @@ -15,8 +15,8 @@ else # bleh shellcheck can't handle disabling in an elif, so nesting this if. # shellcheck disable=SC2154 # set in .bashrc if [[ -s $bashrc_dir/err ]]; then - # shellcheck source=/a/bin/errhandle/err - source $bashrc_dir/err + # shellcheck source=/a/bin/errhandle/err + source $bashrc_dir/err fi fi @@ -2103,8 +2103,6 @@ sgu() { sk() { - - # disable a warning with: # shellcheck disable=SC2206 # reasoning @@ -2116,6 +2114,14 @@ sk() { shellcheck -W 999 -x -e $quotes,$others "$@" || return $? } +skgit() { + local f + for f in $(i s | awk '$1 == "modified:" {print $2}'); do + if [[ $(head -n1 "$f") == '#!/bin/bash'* ]]; then + sk $f + fi + done +} # sl: ssh, but firsh rsync our bashrc and related files to a special # directory on the remote host if needed. -- 2.30.2