X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=brc;h=aaaf87ce3e2156f9c9dd3916f622ed1ca1ed2414;hb=0b452f8ac2191cec4b0ec05537320ddddb213d4f;hp=4274d6e968ea3523e8fbb2569abf78bb9eabc8e2;hpb=523b7ff889aaafdcd997d84b2a06744993018e89;p=distro-setup diff --git a/brc b/brc index 4274d6e..aaaf87c 100644 --- 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 }