about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2017-12-23 17:57:10 +0100
committerLeah Neukirchen <leah@vuxu.org>2017-12-23 17:57:10 +0100
commitd11875b669f27566be0d0d61875b388f5a8bdc37 (patch)
tree599eac390b0bdab2df380151ebe33681fb7539d5
parenta7504b19c86f0e88370deb59cf019e504fd7a8da (diff)
downloadnotyet-d11875b669f27566be0d0d61875b388f5a8bdc37.tar.gz
notyet-d11875b669f27566be0d0d61875b388f5a8bdc37.tar.xz
notyet-d11875b669f27566be0d0d61875b388f5a8bdc37.zip
group by file when multiple files are passed
-rwxr-xr-xnotyet9
1 files changed, 8 insertions, 1 deletions
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