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