From: Ian Kelling Date: Thu, 27 Jul 2023 07:04:48 +0000 (-0400) Subject: minor enhancement for shellchecking things X-Git-Url: https://iankelling.org/git/?p=distro-setup;a=commitdiff_plain;h=656f61e21be6e2f1f4abb456a845340412e8b8a0 minor enhancement for shellchecking things --- 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.