summaryrefslogtreecommitdiff
path: root/rc/bin/newt
diff options
context:
space:
mode:
authorstanley lieber <stanley.lieber@gmail.com>2014-04-11 13:19:18 -0400
committerstanley lieber <stanley.lieber@gmail.com>2014-04-11 13:19:18 -0400
commit4ae2015d865a481829b949a171c055c3ec22fa98 (patch)
treeb1256e33503442f6127d809bba61a9c93bd66952 /rc/bin/newt
parent794197adb16da0f7644cc8b56830316682b89011 (diff)
downloadplan9front-4ae2015d865a481829b949a171c055c3ec22fa98.tar.xz
newt: add 'kf' command to grep $home/lib/newsgroups for group names
Diffstat (limited to 'rc/bin/newt')
-rwxr-xr-xrc/bin/newt6
1 files changed, 5 insertions, 1 deletions
diff --git a/rc/bin/newt b/rc/bin/newt
index 7d6e8ab8e..af5c15b3d 100755
--- a/rc/bin/newt
+++ b/rc/bin/newt
@@ -75,7 +75,7 @@ fn k{
kmnt=`{echo $mnt | sed 's/\//\\\//g'}
f $mnt/$* |
grep -v -e '\/([0-9]+|article|body|header|post|xover)$' |
- sed 's/^'$"kmnt'\// g /g' |
+ sed 's/^'$"kmnt'\// g /g' |
sort
}
fn nshift{ shift; echo $* }
@@ -88,6 +88,7 @@ g ... go to specified group
h print message headlines
help print this help message
k ... list sub-groups under specified group
+kf ... grep $home/lib/newsgroups for regexp
l jump to last message
n next
p print message with minimal headers
@@ -194,6 +195,9 @@ while(){
k $group
case k' '*
k `{nshift $cmd | sed 's/\./\//g'}
+ case kf' '*
+ grep -e `{nshift $cmd} $home/lib/newsgroups |
+ sed 's/^/ g /g'
case l
post=$posts($#posts)
printp $post