diff options
author | Ben S <ogham@bsago.me> | 2015-06-28 13:21:21 +0100 |
---|---|---|
committer | Ben S <ogham@bsago.me> | 2015-06-28 13:21:21 +0100 |
commit | ccdf9ff4a679e00298f7e0fd9bd68318ded20cb8 (patch) | |
tree | 48c7fe31268fa44046e731af13a4d6a120309ace /src/output/lines.rs | |
parent | 766279b803934522af6570c8e465b0d3959ac903 (diff) |
Add --grid --long option
This commit adds --grid, which, when used with --long, will split the details into multiple columns. Currently this is just 2 columns, but in the future it will be based on the width of the terminal.
In order to do this, I had to do two things:
1. Add a `links` parameter to the filename function, which disables the printing of the arrow and link target in the details view. When this is active, the columns get way too large, and it becomes not worth it.
2. Change the `print_table` function from actually printing the table to stdout to returning a list of `Cells` based on the table. This list then gets its width measured to calculate the width of the resulting table.
Diffstat (limited to 'src/output/lines.rs')
-rw-r--r-- | src/output/lines.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/output/lines.rs b/src/output/lines.rs index 1d6dade..7f19105 100644 --- a/src/output/lines.rs +++ b/src/output/lines.rs @@ -13,7 +13,7 @@ pub struct Lines { impl Lines { pub fn view(&self, files: &[File]) { for file in files { - println!("{}", filename(file, &self.colours)); + println!("{}", filename(file, &self.colours, true)); } } } |