diff options
author | Ben S <ogham@bsago.me> | 2015-05-09 23:57:18 +0100 |
---|---|---|
committer | Ben S <ogham@bsago.me> | 2015-05-09 23:57:18 +0100 |
commit | 36116a142095d61ab7f601cb6efda03d2cb8d749 (patch) | |
tree | 8b4057bc23c5a92565610d9067077c87a6e1211b /src/main.rs | |
parent | da49b80c3525db7f0a0aae0fe2ac3e0a9a574cd3 (diff) |
Add colours module, and disable them sometimes
Colours are now disabled when output is not to a terminal. Fixes #53!
This required some internal restructuring - colours are now in their own object that gets passed around everywhere it's needed.
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs index e8ee7e3..7865457 100644 --- a/src/main.rs +++ b/src/main.rs @@ -25,8 +25,8 @@ use std::thread; use dir::Dir; use file::File; use options::{Options, View}; -use output::lines_view; +mod colours; mod column; mod dir; mod feature; @@ -189,7 +189,7 @@ impl<'a> Exa<'a> { match self.options.view { View::Grid(g) => g.view(files), View::Details(d) => d.view(dir, files), - View::Lines => lines_view(files), + View::Lines(l) => l.view(files), } } } |