mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2026-09-18 08:20:10 +00:00
More possibilities with truncate folder marker
This commit is contained in:
committed by
Dominik Ritter
parent
5cc2d51b58
commit
9f4772f993
@@ -211,15 +211,16 @@ function truncatePathFromRight() {
|
||||
|
||||
# Search recursively in parent folders for given file.
|
||||
function upsearch () {
|
||||
if test -e "$1"; then
|
||||
if [[ "$PWD" == "$HOME" || "$PWD" == "/" ]]; then
|
||||
echo "$PWD"
|
||||
elif test -e "$1"; then
|
||||
pushd .. > /dev/null
|
||||
upsearch "$1"
|
||||
popd > /dev/null
|
||||
echo "$PWD"
|
||||
else
|
||||
if [[ "$PWD" == "/" || "$PWD" == "$HOME" ]]; then
|
||||
echo "$PWD";
|
||||
else
|
||||
pushd .. > /dev/null
|
||||
upsearch "$1"
|
||||
popd > /dev/null
|
||||
fi
|
||||
pushd .. > /dev/null
|
||||
upsearch "$1"
|
||||
popd > /dev/null
|
||||
fi
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user