aboutsummaryrefslogblamecommitdiffstats
path: root/test/tput.rs
blob: 3fe9ea1fa37d44e2ce1bb87b2a1c581e3073f2f5 (plain) (tree)
1
2
3
4
5
6
7
8







                                                    




                                                          
 
extern mod term;

fn main () {
    if os::args().len() < 2 {
        fail!(~"usage: tput <terminfo capability>");
    }

    term::info::init();
    let attr: &str = os::args()[1];
    let escape = term::info::escape(attr).expect(
        fmt!("%s is not supported on this terminal", attr)
    );
    print(escape);
}