starship/src/main.rs

29 lines
704 B
Rust
Raw Normal View History

2019-04-02 05:23:03 +02:00
#[macro_use]
extern crate clap;
2019-04-05 02:33:36 +02:00
extern crate ansi_term;
extern crate dirs;
2019-04-07 22:43:11 +02:00
extern crate git2;
2019-04-04 02:14:26 +02:00
mod modules;
mod print;
2019-04-04 04:57:50 +02:00
use clap::{App, Arg};
2019-04-02 06:45:49 +02:00
2019-04-02 05:23:03 +02:00
fn main() {
2019-04-04 04:57:50 +02:00
let args = App::new("Starship")
2019-04-02 05:30:53 +02:00
.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!())
2019-04-04 02:14:26 +02:00
.after_help("https://github.com/matchai/starship")
2019-04-04 04:57:50 +02:00
.arg(
Arg::with_name("status_code")
.help("The status code of the previously run command")
.required(true),
)
2019-04-02 05:30:53 +02:00
.get_matches();
2019-04-02 06:45:49 +02:00
2019-04-04 04:57:50 +02:00
print::prompt(args);
2019-04-02 05:23:03 +02:00
}