mirror of
https://github.com/starship/starship.git
synced 2026-06-23 02:05:51 +07:00
fix: Fix issues with nodejs and golang configuration (#146)
* fix: Give all modules a single name * test: Add missing config tests for nodejs and golang * test: Rename dir to directory
This commit is contained in:
@@ -30,7 +30,7 @@ pub fn module<'a>(context: &'a Context) -> Option<Module<'a>> {
|
||||
const GO_CHAR: &str = "🐹 ";
|
||||
let module_color = Color::Cyan.bold();
|
||||
|
||||
let mut module = context.new_module("go")?;
|
||||
let mut module = context.new_module("golang")?;
|
||||
module.set_style(module_color);
|
||||
|
||||
let formatted_version = format_go_version(&go_version)?;
|
||||
|
||||
+5
-5
@@ -18,12 +18,12 @@ use crate::module::Module;
|
||||
|
||||
pub fn handle<'a>(module: &str, context: &'a Context) -> Option<Module<'a>> {
|
||||
match module {
|
||||
"dir" | "directory" => directory::module(context),
|
||||
"char" | "character" => character::module(context),
|
||||
"node" | "nodejs" => nodejs::module(context),
|
||||
"rust" | "rustlang" => rust::module(context),
|
||||
"directory" => directory::module(context),
|
||||
"character" => character::module(context),
|
||||
"nodejs" => nodejs::module(context),
|
||||
"rust" => rust::module(context),
|
||||
"python" => python::module(context),
|
||||
"go" | "golang" => golang::module(context),
|
||||
"golang" => golang::module(context),
|
||||
"line_break" => line_break::module(context),
|
||||
"package" => package::module(context),
|
||||
"git_branch" => git_branch::module(context),
|
||||
|
||||
@@ -26,7 +26,7 @@ pub fn module<'a>(context: &'a Context) -> Option<Module<'a>> {
|
||||
const NODE_CHAR: &str = "⬢ ";
|
||||
let module_color = Color::Green.bold();
|
||||
|
||||
let mut module = context.new_module("node")?;
|
||||
let mut module = context.new_module("nodejs")?;
|
||||
module.set_style(module_color);
|
||||
|
||||
let formatted_version = node_version.trim();
|
||||
|
||||
Reference in New Issue
Block a user