diff --git a/src/indicators/pwd.rs b/src/indicators/pwd.rs index 328acf1..21fb3a3 100644 --- a/src/indicators/pwd.rs +++ b/src/indicators/pwd.rs @@ -58,8 +58,7 @@ pub fn pwd( replace_repo: bool, git_repo: Option, ) -> ANSIGenericString<'static, str> { - //let slash_limit: u8 = if replace_repo { 2 } else { 3 }; // Max number of slashes - let slash_limit: u8 = 3; // Max number of slashes + let mut slash_limit: u8 = 3; // Max number of slashes let mut path = full_path(); // Get the full path of he current directory // Replace a git repo root path with the repo's name @@ -68,7 +67,7 @@ pub fn pwd( path = remove_repo(&path, &repo_path); let repo_name = repo_name(&repo_path); if shorten_path { - let slash_limit: u8 = 2; // Max number of slashes + slash_limit = 2; // Max number of slashes path = short(&path, slash_limit); } return if path.is_empty() {