mirror of
https://github.com/nix-community/home-manager
synced 2024-11-30 06:59:45 +01:00
yazi: use builtin cd
cd conflicts with aliases that dont support -- syntax
This commit is contained in:
parent
65e0f5aa25
commit
e8482a798f
4 changed files with 5 additions and 5 deletions
|
@ -11,7 +11,7 @@ let
|
||||||
local tmp="$(mktemp -t "yazi-cwd.XXXXX")"
|
local tmp="$(mktemp -t "yazi-cwd.XXXXX")"
|
||||||
yazi "$@" --cwd-file="$tmp"
|
yazi "$@" --cwd-file="$tmp"
|
||||||
if cwd="$(cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then
|
if cwd="$(cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then
|
||||||
cd -- "$cwd"
|
builtin cd -- "$cwd"
|
||||||
fi
|
fi
|
||||||
rm -f -- "$tmp"
|
rm -f -- "$tmp"
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,7 @@ let
|
||||||
set tmp (mktemp -t "yazi-cwd.XXXXX")
|
set tmp (mktemp -t "yazi-cwd.XXXXX")
|
||||||
yazi $argv --cwd-file="$tmp"
|
yazi $argv --cwd-file="$tmp"
|
||||||
if set cwd (cat -- "$tmp"); and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ]
|
if set cwd (cat -- "$tmp"); and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ]
|
||||||
cd -- "$cwd"
|
builtin cd -- "$cwd"
|
||||||
end
|
end
|
||||||
rm -f -- "$tmp"
|
rm -f -- "$tmp"
|
||||||
end
|
end
|
||||||
|
|
|
@ -6,7 +6,7 @@ let
|
||||||
local tmp="$(mktemp -t "yazi-cwd.XXXXX")"
|
local tmp="$(mktemp -t "yazi-cwd.XXXXX")"
|
||||||
yazi "$@" --cwd-file="$tmp"
|
yazi "$@" --cwd-file="$tmp"
|
||||||
if cwd="$(cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then
|
if cwd="$(cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then
|
||||||
cd -- "$cwd"
|
builtin cd -- "$cwd"
|
||||||
fi
|
fi
|
||||||
rm -f -- "$tmp"
|
rm -f -- "$tmp"
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@ let
|
||||||
set tmp (mktemp -t "yazi-cwd.XXXXX")
|
set tmp (mktemp -t "yazi-cwd.XXXXX")
|
||||||
yazi $argv --cwd-file="$tmp"
|
yazi $argv --cwd-file="$tmp"
|
||||||
if set cwd (cat -- "$tmp"); and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ]
|
if set cwd (cat -- "$tmp"); and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ]
|
||||||
cd -- "$cwd"
|
builtin cd -- "$cwd"
|
||||||
end
|
end
|
||||||
rm -f -- "$tmp"
|
rm -f -- "$tmp"
|
||||||
end
|
end
|
||||||
|
|
|
@ -6,7 +6,7 @@ let
|
||||||
local tmp="$(mktemp -t "yazi-cwd.XXXXX")"
|
local tmp="$(mktemp -t "yazi-cwd.XXXXX")"
|
||||||
yazi "$@" --cwd-file="$tmp"
|
yazi "$@" --cwd-file="$tmp"
|
||||||
if cwd="$(cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then
|
if cwd="$(cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then
|
||||||
cd -- "$cwd"
|
builtin cd -- "$cwd"
|
||||||
fi
|
fi
|
||||||
rm -f -- "$tmp"
|
rm -f -- "$tmp"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue