mirror of
https://github.com/starship/starship.git
synced 2024-11-22 08:14:10 +01:00
Rename segements
This commit is contained in:
parent
168d568d54
commit
472b66894d
@ -1,6 +1,5 @@
|
||||
#[macro_use]
|
||||
extern crate clap;
|
||||
extern crate rayon;
|
||||
extern crate ansi_term;
|
||||
extern crate dirs;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
mod char;
|
||||
mod dir;
|
||||
mod line_sep;
|
||||
mod directory;
|
||||
mod line_break;
|
||||
|
||||
use clap::ArgMatches;
|
||||
use ansi_term::Style;
|
||||
@ -32,9 +32,9 @@ impl Default for Segment {
|
||||
|
||||
pub fn handle(module: &str, args: &ArgMatches) -> Segment {
|
||||
match module {
|
||||
"char" => char::segment(&args),
|
||||
"dir" => dir::segment(&args),
|
||||
"line_sep" => line_sep::segment(&args),
|
||||
"char" | "character" => char::segment(&args),
|
||||
"dir" | "directory" => directory::segment(&args),
|
||||
"line_break" => line_break::segment(&args),
|
||||
|
||||
_ => panic!("Unknown module: {}", module),
|
||||
}
|
||||
|
@ -3,7 +3,7 @@ use crate::modules::Segment;
|
||||
use clap::ArgMatches;
|
||||
|
||||
pub fn prompt(args: ArgMatches) {
|
||||
let default_prompt = vec!["dir", "line_sep", "char"];
|
||||
let default_prompt = vec!["directory", "line_break", "character"];
|
||||
|
||||
default_prompt.into_iter()
|
||||
.map(|module| modules::handle(module, &args))
|
||||
|
Loading…
Reference in New Issue
Block a user