Notes: Add support for un-pretty tables

This commit is contained in:
Matthias Beyer 2016-01-06 19:54:21 +01:00
parent 56730cb7b8
commit 75dfc2b097
2 changed files with 9 additions and 1 deletions

View file

@ -397,6 +397,12 @@ subcommands:
version: 0.1 version: 0.1
author: Matthias Beyer <mail@beyermatthias.de> author: Matthias Beyer <mail@beyermatthias.de>
args: args:
- pretty:
long: pretty
help: Print table with ASCII-border
required: false
takes_value: false
- namegrep: - namegrep:
short: n short: n
long: name long: name

View file

@ -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)) 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( printer.print_files_custom(
self.rt.store() self.rt.store()