diff options
Diffstat (limited to 'src/modules/mod.rs')
-rw-r--r-- | src/modules/mod.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/modules/mod.rs b/src/modules/mod.rs index 3ab7d8b3f..4aa67108e 100644 --- a/src/modules/mod.rs +++ b/src/modules/mod.rs @@ -1,3 +1,4 @@ +// While adding out new module add out module to src/module.rs ALL_MODULES const array also. mod battery; mod character; mod cmd_duration; @@ -35,6 +36,9 @@ pub fn handle<'a>(module: &str, context: &'a Context) -> Option<Module<'a>> { "cmd_duration" => cmd_duration::module(context), "jobs" => jobs::module(context), - _ => panic!("Unknown module: {}", module), + _ => { + eprintln!("Error: Unknown module {}. Use starship module --list to list out all supported modules.", module); + None + } } } |