forked from reujab/silver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mod.rs
33 lines (30 loc) · 898 Bytes
/
mod.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
mod cmdtime;
mod conda;
mod dir;
mod env;
mod git;
mod os;
mod shell;
mod status;
mod time;
mod toolbox;
mod user;
mod virtualenv;
use crate::Segment;
pub fn handle(module: &str, segment: &mut Segment, args: &[&str]) {
match module {
"os" => os::segment(segment, args),
"status" => status::segment(segment, args),
"dir" => dir::segment(segment, args),
"git" => git::segment(segment, args),
"user" => user::segment(segment, args),
"cmdtime" => cmdtime::segment(segment, args),
"time" => time::segment(segment, args),
"virtualenv" => virtualenv::segment(segment, args),
"conda" => conda::segment(segment, args),
"toolbox" => toolbox::segment(segment, args),
"shell" => shell::segment(segment, args),
"env" => env::segment(segment, args),
_ => panic!("unknown module, {}", module),
}
}