Skip to content

Commit

Permalink
Enable pretty color printing in gnome-terminal
Browse files Browse the repository at this point in the history
`term` crate has an issue reading terminal properties in gnome-terminal:
Stebalien/term#81

This was fixed in term v0.5.0. Bump version of dependencies `term` and
`prettytable-rs` to use `term` v0.5.* and do minor fixes to use new
`prettytable-rs` API.
  • Loading branch information
mogenson authored and kooparse committed Dec 7, 2018
1 parent df3ca8b commit aa8e1e2
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 53 deletions.
81 changes: 34 additions & 47 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ keywords = ["cryptocurrency", "ticker", "bitcoin", "ethereum"]
[dependencies]
clippy = { version = "*", optional = true }
termion = "1.5.1"
term = "0.4.6"
term = "0.5"
reqwest = "0.9"
serde = "1.0"
serde_json = "1.0"
serde_derive = "1.0"
clap = {version = "2.29", features = ["yaml"]}
prettytable-rs = "0.6.7"
prettytable-rs = "0.8"
2 changes: 1 addition & 1 deletion src/cell.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use prettytable::cell::Cell;
use prettytable::Cell;
use term::{color, Attr};

pub struct LayoutCell {
Expand Down
5 changes: 2 additions & 3 deletions src/layout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ use cell::LayoutCell;
use currency;
use currency::Currency;

use prettytable::Table;
use prettytable::row::Row;
use prettytable::{Table, Row};

pub struct Layout<'a> {
headers: Vec<String>,
Expand Down Expand Up @@ -43,7 +42,7 @@ impl<'a> Layout<'a> {
}

pub fn print(&self) {
self.get_table().print_tty(false)
self.get_table().print_tty(false);
}

pub fn get_table(&self) -> Table {
Expand Down

0 comments on commit aa8e1e2

Please sign in to comment.