commit - fda61b3f57385c19eae0c0203eefd864f81e689d
commit + ba7fa014d93988efab6b9fba4a63652d9a598447
blob - da163c21f3dd012a454478bcf736b7f3739b0513
blob + 0fae9824069d3b6061b1ca17f025fe3aa55a5959
--- painlist
+++ painlist
#!/bin/sh
# simplistic pain list printer
-# pesco 2016-2019, isc license
+# pesco 2016-2020, 2024; isc license
#
# reads issue items on stdin, one per line, not indented. items are arbitrary
# text, rated by adding ">AxBxC<" anywhere on the line, where A,B,C,... are
if test -t 1 # is stdout a tty?
then
nocolor=0
- maxitems=$(($(tput li) - 5))
+ maxitems=$(($(tput lines) - 5))
fi
args=`getopt npsvt:l: $*`
# filter by pattern argument
{
- if(xor(!match($0, pattern), invert)) next
+ ignore = !match($0, pattern)
+ if(invert) ignore = !ignore
+ if(ignore) next
}
# count pending (indented) items