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