From d11875b669f27566be0d0d61875b388f5a8bdc37 Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Sat, 23 Dec 2017 17:57:10 +0100 Subject: group by file when multiple files are passed --- notyet | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/notyet b/notyet index 8730da7..76d345f 100755 --- a/notyet +++ b/notyet @@ -209,12 +209,19 @@ opt_parser = OptionParser.new { |opts| files = [File.expand_path("~/.notyet")] if files.empty? t = nil +if files.size > 1 + t = Entry.new(-1, "/", "", "", 0, []) +end files.each { |file| file = "/dev/stdin" if file == "-" File.open(file) { |f| d = parse(f, file) if t - t.children.concat d.children + d.state = "-" + d.desc = file + d.reindent(2) + d.depth = 0 + t.children << d else t = d end -- cgit 1.4.1