various fixes
[distro-setup] / brc
diff --git a/brc b/brc
index 4274d6e968ea3523e8fbb2569abf78bb9eabc8e2..aaaf87ce3e2156f9c9dd3916f622ed1ca1ed2414 100644 (file)
--- a/brc
+++ b/brc
@@ -2181,7 +2181,7 @@ skq() {
 skgit() {
   local f
   for f in $(i s | awk '$1 == "modified:" {print $2}'); do
-    if [[ $(head -n1 "$f") == '#!/bin/bash'* ]]; then
+    if istext "$f" && [[ $(head -n1 "$f" 2>/dev/null) == '#!/bin/bash'* ]]; then
       sk $f ||:
     fi
   done
@@ -2788,7 +2788,7 @@ vim() {
 # ls count. usage: pass a directory, get the number of files.
 # https://unix.stackexchange.com/questions/90106/whats-the-most-resource-efficient-way-to-count-how-many-files-are-in-a-director
 lsc() {
-  # shellcheck disable=SC2790 # intentional
+  # shellcheck disable=SC2790 disable=SC2012 # intentional
   ls -Uq "$@"|wc -l
 }