summaryrefslogtreecommitdiffstats
path: root/src/main.rs
blob: 7cbe7d2250a8816e289170fec66f4d1539a8a725 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#[macro_use]
extern crate clap;
extern crate ansi_term;

mod modules;
mod print;

use ansi_term::Style;
use clap::{App, Arg};

pub struct Segment {
    style: Style,
    value: String,
    prefix: Option<Box<Segment>>,
    suffix: Option<Box<Segment>>,
}

fn main() {
    let args = App::new("Starship")
        .about("The cross-platform prompt for astronauts. ✨🚀")
        // pull the version number from Cargo.toml
        .version(crate_version!())
        // pull the authors from Cargo.toml
        .author(crate_authors!())
        .after_help("https://github.com/matchai/starship")
        .arg(
            Arg::with_name("status_code")
                .help("The status code of the previously run command")
                .required(true),
        )
        .get_matches();

    print::prompt(args);
}