From 75dfc2b097b5dc4cd04f3a1baefef0519c1e68dc Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Wed, 6 Jan 2016 19:54:21 +0100 Subject: [PATCH] Notes: Add support for un-pretty tables --- etc/cli.yml | 6 ++++++ src/module/notes/mod.rs | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/etc/cli.yml b/etc/cli.yml index 553a8f52..0889605f 100644 --- a/etc/cli.yml +++ b/etc/cli.yml @@ -397,6 +397,12 @@ subcommands: version: 0.1 author: Matthias Beyer args: + - pretty: + long: pretty + help: Print table with ASCII-border + required: false + takes_value: false + - namegrep: short: n long: name diff --git a/src/module/notes/mod.rs b/src/module/notes/mod.rs index 5647e85d..b016b8c3 100644 --- a/src/module/notes/mod.rs +++ b/src/module/notes/mod.rs @@ -274,7 +274,9 @@ impl<'a> Notes<'a> { hash_filter.or(Box::new(head_filter)).and(Box::new(text_filter)).and(Box::new(tags_filter)) }; - let printer = TablePrinter::new(self.rt.is_verbose(), self.rt.is_debugging(), true); + let pretty = matches.is_present("pretty"); + debug!("Printing pretty table = {}", pretty); + let printer = TablePrinter::new(self.rt.is_verbose(), self.rt.is_debugging(), pretty); printer.print_files_custom( self.rt.store()