1
0
mirror of https://github.com/Llewellynvdm/starship.git synced 2024-06-05 18:10:47 +00:00
starship/src/main.rs

37 lines
826 B
Rust
Raw Normal View History

2019-04-02 03:23:03 +00:00
#[macro_use]
extern crate clap;
2019-04-09 03:35:14 +00:00
2019-04-05 00:33:36 +00:00
extern crate ansi_term;
2019-05-22 16:29:39 +00:00
extern crate battery;
2019-04-05 00:33:36 +00:00
extern crate dirs;
2019-04-07 20:43:11 +00:00
extern crate git2;
2019-05-14 04:43:11 +00:00
extern crate pretty_env_logger;
2019-04-04 00:14:26 +00:00
mod context;
2019-05-01 20:34:24 +00:00
mod module;
2019-04-04 00:14:26 +00:00
mod modules;
mod print;
2019-04-12 21:49:20 +00:00
mod segment;
2019-04-04 00:14:26 +00:00
2019-04-04 02:57:50 +00:00
use clap::{App, Arg};
2019-04-02 04:45:49 +00:00
2019-04-02 03:23:03 +00:00
fn main() {
2019-05-14 04:43:11 +00:00
pretty_env_logger::init();
2019-04-04 02:57:50 +00:00
let args = App::new("Starship")
2019-04-13 04:33:50 +00:00
.about("The cross-shell prompt for astronauts. ✨🚀")
2019-04-02 03:30:53 +00:00
// pull the version number from Cargo.toml
.version(crate_version!())
// pull the authors from Cargo.toml
.author(crate_authors!())
2019-04-04 00:14:26 +00:00
.after_help("https://github.com/matchai/starship")
2019-04-04 02:57:50 +00:00
.arg(
Arg::with_name("status_code")
.help("The status code of the previously run command")
.required(true),
)
2019-04-02 03:30:53 +00:00
.get_matches();
2019-04-02 04:45:49 +00:00
2019-04-04 02:57:50 +00:00
print::prompt(args);
2019-04-02 03:23:03 +00:00
}