summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2016-01-06 19:54:21 +0100
committerMatthias Beyer <mail@beyermatthias.de>2016-01-06 19:54:21 +0100
commit75dfc2b097b5dc4cd04f3a1baefef0519c1e68dc (patch)
tree926376ffd9e9f319d49e0b0848887f64712a622e
parent56730cb7b8559c560745b80b97c4407893d80cde (diff)
Notes: Add support for un-pretty tables
-rw-r--r--etc/cli.yml6
-rw-r--r--src/module/notes/mod.rs4
2 files changed, 9 insertions, 1 deletions
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 <mail@beyermatthias.de>
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()