diff options
author | qwx <qwx@sciops.net> | 2022-11-15 21:58:00 +0000 |
---|---|---|
committer | qwx <qwx@sciops.net> | 2022-11-15 21:58:00 +0000 |
commit | e2566e93e871e288a8a3865585cf53072c53d047 (patch) | |
tree | 6a0529f378161c82672589dbbc8183bd51efd6de /rc/bin | |
parent | f9fba3091ae59d88fbe40bd3c4a0117c1413c135 (diff) |
history: fix walking and handling files with spaces
Diffstat (limited to 'rc/bin')
-rw-r--r-- | rc/bin/history | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/rc/bin/history b/rc/bin/history index e816035ae..206d404d8 100644 --- a/rc/bin/history +++ b/rc/bin/history @@ -6,7 +6,7 @@ nl=' 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 @@ fn ysearch { 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 |