dot

packages and services management
Log | Files | Refs | README

commit 383df00d217cd5b3e2b26311712be39710aa8adb
parent 1d6f8239bf5fc17cf95a3f5f5e39c6944b7753bb
Author: Josuah Demangeon <mail@josuah.net>
Date:   Thu, 30 Nov 2017 18:35:39 +0100

performances: pass files to awk as bundles of 128

Diffstat:
Mbin/io-src | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/bin/io-src b/bin/io-src @@ -1,6 +1,6 @@ #!/bin/sh -less "$(find "$1" -type f ! -path '*/.git/*' | sort | xargs -n 1 awk ' - BEGIN { printf("#%s\n", ARGV[1]); } { printf("%7s\t%s\n", FNR, $0); } - ' | iomenu -# -p search | cut -f 1 -)" +less "$(find "$1" -name .git -prune -o -type f | sort | xargs -n 128 awk ' +FNR == 1 { printf("#%s\n", FILENAME); } + { printf("%7s\t%s\n", FNR, $0); } +' | iomenu -# -p search | cut -f 1)"