Created
January 8, 2017 04:18
-
-
Save sourcefrog/b35f87e986de26ffd81e9579c1dc3431 to your computer and use it in GitHub Desktop.
Demonstrate rust term and iTerm2 problems
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extern crate term; | |
fn main() { | |
let mut t = term::stdout().unwrap(); | |
t.fg(term::color::BRIGHT_GREEN).unwrap(); | |
t.bg(term::color::BLUE).unwrap(); | |
write!(t, "hello 123123123123123123").unwrap(); | |
t.carriage_return().unwrap(); | |
t.flush().unwrap(); | |
t.bg(term::color::BLACK).unwrap(); | |
t.fg(term::color::WHITE).unwrap(); | |
t.delete_line().unwrap(); | |
write!(t, "again").unwrap(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment