Minor change in logic
This commit is contained in:
parent
735158a123
commit
3ca299e14f
@ -58,8 +58,7 @@ pub fn pwd(
|
||||
replace_repo: bool,
|
||||
git_repo: Option<String>,
|
||||
) -> 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() {
|
||||
|
Loading…
Reference in New Issue
Block a user