aboutsummaryrefslogtreecommitdiff
path: root/bin/80
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2023-07-03 09:32:44 -0300
committerEuAndreh <eu@euandre.org>2023-07-03 09:32:44 -0300
commit0ac75cc35647835c53d01237c64f34006a9e7198 (patch)
tree6dd77a0d7ee43254a17d9c7a89cf6b2879d268ed /bin/80
parentetc/guix/home.scm: Add "disorderfs" and "reprotest" packages (diff)
downloaddotfiles-0ac75cc35647835c53d01237c64f34006a9e7198.tar.gz
dotfiles-0ac75cc35647835c53d01237c64f34006a9e7198.tar.xz
bin/80: expand(1) tabs to 8 spaces before counting
Diffstat (limited to 'bin/80')
-rwxr-xr-xbin/8010
1 files changed, 5 insertions, 5 deletions
diff --git a/bin/80 b/bin/80
index 9ab6fb4..31939cd 100755
--- a/bin/80
+++ b/bin/80
@@ -68,19 +68,19 @@ done
shift $((OPTIND - 1))
len() {
- awk '
+ awk -vNAME="$1" '
length > 80 {
- printf "%s:%s:%s\n", FILENAME, FNR, $0
+ printf "%s:%s:%s\n", NAME, FNR, $0
}
- ' "$1"
+ '
}
if [ $# = 0 ]; then
vcs ls | while read -r f; do
- len "$f"
+ expand "$f" | len "$f"
done
else
for f in "$@"; do
- len "$f"
+ expand "$f" | len "$f"
done
fi