dev #1

Merged
candifloss merged 23 commits from dev into main 2024-12-02 04:26:43 +00:00
Showing only changes of commit 3ca299e14f - Show all commits

View File

@ -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() {