From f9627e02d0987551f80d68447b65bc05ba7d19aa Mon Sep 17 00:00:00 2001 From: Mariano Casco Date: Mon, 30 May 2016 17:32:57 -0300 Subject: [PATCH] tail: print empty line between headers --- src/tail/tail.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/tail/tail.rs b/src/tail/tail.rs index ab526ec97..a806af722 100755 --- a/src/tail/tail.rs +++ b/src/tail/tail.rs @@ -147,6 +147,7 @@ pub fn uumain(args: Vec) -> i32 { unbounded_tail(buffer, &settings); } else { let mut multiple = false; + let mut first_header = true; let mut readers = Vec::new(); if files.len() > 1 { @@ -155,8 +156,10 @@ pub fn uumain(args: Vec) -> i32 { for filename in &files { if multiple { + if !first_header { println!(""); } println!("==> {} <==", filename); } + first_header = false; let path = Path::new(filename); let file = File::open(&path).unwrap();