fixed errors
This commit is contained in:
parent
927aeec3ba
commit
69ea3213a5
@ -25,7 +25,7 @@ fn get_shell_char (shell: String) -> String {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn get_git_char (git_branch: String) -> ColoredString {
|
fn get_git_char (git_branch: String) -> ColoredString {
|
||||||
match get_git_char.as_str() {
|
match git_branch.as_str() {
|
||||||
"main" => " ".truecolor(178,98,44),
|
"main" => " ".truecolor(178,98,44),
|
||||||
"master" => " ".truecolor(196,132,29),
|
"master" => " ".truecolor(196,132,29),
|
||||||
_ => " ".truecolor(82,82,82),
|
_ => " ".truecolor(82,82,82),
|
||||||
@ -104,11 +104,8 @@ fn main() -> std::io::Result<()> {
|
|||||||
.split(" ").collect::<Vec<&str>>()[2]
|
.split(" ").collect::<Vec<&str>>()[2]
|
||||||
.truecolor(82,82,82);
|
.truecolor(82,82,82);
|
||||||
|
|
||||||
git_char = match git_branch.to_string().as_str() {
|
git_char = get_git_char(git_branch.to_string());
|
||||||
"main" => " ".truecolor(178,98,44),
|
|
||||||
"master" => " ".truecolor(196,132,29),
|
|
||||||
_ => " ".truecolor(82,82,82),
|
|
||||||
};
|
|
||||||
let git_repo_root_cmd = Command::new("git")
|
let git_repo_root_cmd = Command::new("git")
|
||||||
.arg("rev-parse")
|
.arg("rev-parse")
|
||||||
.arg("--show-toplevel")
|
.arg("--show-toplevel")
|
||||||
|
Loading…
Reference in New Issue
Block a user