mirror of
https://github.com/RGBCube/nu_scripts
synced 2025-08-02 07:07:46 +00:00
parent
7f8d633ac3
commit
048017afea
2 changed files with 4 additions and 4 deletions
|
@ -56,7 +56,7 @@ def path_abbrev_if_needed [apath term_width] {
|
||||||
let tokens = ($tokens | prepend $"($T)~")
|
let tokens = ($tokens | prepend $"($T)~")
|
||||||
|
|
||||||
# append the last part of the path
|
# 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
|
# collect
|
||||||
$tokens | str collect $"($T)/"
|
$tokens | str collect $"($T)/"
|
||||||
|
@ -94,7 +94,7 @@ def path_abbrev_if_needed [apath term_width] {
|
||||||
let tokens = (for x in $top_part {
|
let tokens = (for x in $top_part {
|
||||||
$"/($T)(($x | split chars).0)($R)"
|
$"/($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)"
|
$tokens | str collect $"($T)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,7 +55,7 @@ def path_abbrev_if_needed [apath term_width] {
|
||||||
let tokens = ($tokens | prepend $"($T)~")
|
let tokens = ($tokens | prepend $"($T)~")
|
||||||
|
|
||||||
# append the last part of the path
|
# 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
|
# collect
|
||||||
$tokens | str collect $"($T)/"
|
$tokens | str collect $"($T)/"
|
||||||
|
@ -93,7 +93,7 @@ def path_abbrev_if_needed [apath term_width] {
|
||||||
let tokens = (for x in $top_part {
|
let tokens = (for x in $top_part {
|
||||||
$"/($T)(($x | split chars).0)($R)"
|
$"/($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)"
|
$tokens | str collect $"($T)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue