From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED autolearn=no autolearn_force=no version=3.4.4 Received: (qmail 696 invoked from network); 13 Nov 2022 23:23:50 -0000 Received: from 9front.inri.net (168.235.81.73) by inbox.vuxu.org with ESMTPUTF8; 13 Nov 2022 23:23:50 -0000 Received: from wopr.sciops.net ([216.126.196.60]) by 9front; Sun Nov 13 18:20:28 -0500 2022 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sciops.net; s=20210706; t=1668381496; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to; bh=I11booicS4pbwGS203HdLwq5+KZQ19XVWPGDuVXcbno=; b=TkI1P4DOwjYA4BYIM3PLKnVY3pQNnNAqBKwigTea2yjlgfULCpRpb4heCwESG0WeKeASG3 rAhfmoGcn6Wo1ohGFXgLeC6VpHOMDhce5JeH5xnm1YhVvjvBtBfKrlfCzhtRpOGsrd2mV6 83r6WL9By7RSwuAUpykl/Z9Q+20ZIhk= Received: by wopr.sciops.net (OpenSMTPD) with ESMTPSA id df7893c9 (TLSv1.2:ECDHE-RSA-CHACHA20-POLY1305:256:NO) for <9front@9front.org>; Sun, 13 Nov 2022 15:18:16 -0800 (PST) Message-ID: <4F3FECF74D0D8AB5A41EA721BCAC9295@wopr.sciops.net> Date: Mon, 14 Nov 2022 00:20:22 +0100 From: qwx@sciops.net To: 9front@9front.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: virtual secure general-purpose element control Subject: Re: [9front] this history(1) is scratched Reply-To: 9front@9front.org Precedence: bulk Hello, Sorry for the delay. After a bunch of testing, I agree with Eckard wrt. how the substitution should be done, I had used `sub($1 "["FS"]+", "")' with success, but `gsub($1 "[ \t]+", "")' might make more sense. ; history /lib/vgadb Aug 21 10:50:43 CES 2022 /lib/vgadb 44403 [qwx] Aug 21 10:50:43 CES 2022 /n/dump/2022/1113/lib/vgadb 44403 [qwx] Aug 20 20:42:16 CES 2022 /n/dump/2022/0821/lib/vgadb 44403 [qwx] Aug 12 06:47:55 CES 2022 /n/dump/2022/0820/lib/vgadb 44398 [qwx] [...] Unfortunately, there's another issue, handling files with spaces: ; history '/lib/v/The Power Glove (NES) - Angry Video Game Nerd (AVGN)-MYDuy7wM8Gk.mkv' Aug 30 14:05:32 CES 2021 /lib/v/The 0 [Glove] walk: path: '/n/dump/2022/1113/lib/v/The Power Glove (NES) - Angry Video Game Nerd (AVGN)-MYDuy7wM8Gk.mkv': '''' directory entry not found Nov 13 23:20:18 CET 2022walk: path: '/n/dump/2022/1113/lib/v/The Power Glove (NES) - Angry Video Game Nerd (AVGN)-MYDuy7wM8Gk.mkv': '''' directory entry not found That seems easy to fix: awk is fed the output of ls -qr, and it's enough to add -Q there. Later, pretty printing the paths must also be adjusted. That seems to be enough: ; history '/lib/v/The Power Glove (NES) - Angry Video Game Nerd (AVGN)-MYDuy7wM8Gk.mkv' Aug 30 14:05:32 CES 2021 /lib/v/The Power Glove (NES) - Angry Video Game Nerd (AVGN)-MYDuy7wM8Gk.mkv 33349226 [qwx] Aug 30 14:05:32 CES 2021 /n/dump/2022/1113/lib/v/The Power Glove (NES) - Angry Video Game Nerd (AVGN)-MYDuy7wM8Gk.mkv 33349226 [qwx] I don't know if the quotes should be preserved in that case. I also agree with Anthony that care should be taken when something like this occurs; then again it's rare enough that maybe forcing an announcement on the ml is enough? This has usually been the way thus far for any breaking or important changes. Patch below, any comments welcome. Thanks! Cheers, qwx diff 7fcf96b44dc4765605b827ba49d389b5711d7e72 uncommitted --- a//rc/bin/history +++ b//rc/bin/history @@ -6,7 +6,7 @@ fn prfile { echo -n `{date $flagu -f 'MMM DD hh:mm:ss ZZZ YYYY' `{walk -e m $1}} - walk -e psM $1 | awk '{printf " %s %lld [%s]\n", $1,$2,$3,$4}' + walk -e psM $1 | awk '{$NF="["$NF"]"; print " "$0}' } fn diffflags { @@ -31,12 +31,12 @@ echo history: warning: $file does not exist >[1=2] old=() - ls -qr /n/$dump/*/*/$file >[2] /dev/null | + ls -Qqr /n/$dump/*/*/$file >[2] /dev/null | sed 's/\(([^ ]*) *([^ ]*) *([^ ]*)\)/\1\2\3/p' | awk '"/n/'$dump/$since'" <= $2 {next} $1 != qid { qid=$1 - gsub($1, "") + gsub($1"[ \t]+", "") print}' | while(new=`$nl{read}){ prfile $new