diff --git a/prompt/oh-my-minimal.nu b/prompt/oh-my-minimal.nu index 2195aee..65420b8 100644 --- a/prompt/oh-my-minimal.nu +++ b/prompt/oh-my-minimal.nu @@ -56,7 +56,7 @@ def path_abbrev_if_needed [apath term_width] { let tokens = ($tokens | prepend $"($T)~") # append the last part of the path - let tokens = ($tokens | append $"($PB)($splits | last | get 0)($R)") + let tokens = ($tokens | append $"($PB)($splits | last)($R)") # collect $tokens | str collect $"($T)/" @@ -94,7 +94,7 @@ def path_abbrev_if_needed [apath term_width] { let tokens = (for x in $top_part { $"/($T)(($x | split chars).0)($R)" }) - let tokens = ($tokens | append $"/($PB)($end_part.0)($R)") + let tokens = ($tokens | append $"/($PB)($end_part)($R)") $tokens | str collect $"($T)" } } diff --git a/prompt/oh-my.nu b/prompt/oh-my.nu index 33c03d5..96e0c75 100644 --- a/prompt/oh-my.nu +++ b/prompt/oh-my.nu @@ -55,7 +55,7 @@ def path_abbrev_if_needed [apath term_width] { let tokens = ($tokens | prepend $"($T)~") # append the last part of the path - let tokens = ($tokens | append $"($PB)($splits | last | get 0)($R)") + let tokens = ($tokens | append $"($PB)($splits | last)($R)") # collect $tokens | str collect $"($T)/" @@ -93,7 +93,7 @@ def path_abbrev_if_needed [apath term_width] { let tokens = (for x in $top_part { $"/($T)(($x | split chars).0)($R)" }) - let tokens = ($tokens | append $"/($PB)($end_part.0)($R)") + let tokens = ($tokens | append $"/($PB)($end_part)($R)") $tokens | str collect $"($T)" } }