1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2024-12-14 11:57:55 +00:00

yazi: use builtin cd

cd conflicts with aliases that dont support -- syntax
This commit is contained in:
Austin Horstman 2024-05-27 16:50:57 -05:00 committed by GitHub
parent 65e0f5aa25
commit e8482a798f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 5 additions and 5 deletions

View file

@ -11,7 +11,7 @@ let
local tmp="$(mktemp -t "yazi-cwd.XXXXX")"
yazi "$@" --cwd-file="$tmp"
if cwd="$(cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then
cd -- "$cwd"
builtin cd -- "$cwd"
fi
rm -f -- "$tmp"
}
@ -22,7 +22,7 @@ let
set tmp (mktemp -t "yazi-cwd.XXXXX")
yazi $argv --cwd-file="$tmp"
if set cwd (cat -- "$tmp"); and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ]
cd -- "$cwd"
builtin cd -- "$cwd"
end
rm -f -- "$tmp"
end

View file

@ -6,7 +6,7 @@ let
local tmp="$(mktemp -t "yazi-cwd.XXXXX")"
yazi "$@" --cwd-file="$tmp"
if cwd="$(cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then
cd -- "$cwd"
builtin cd -- "$cwd"
fi
rm -f -- "$tmp"
}

View file

@ -6,7 +6,7 @@ let
set tmp (mktemp -t "yazi-cwd.XXXXX")
yazi $argv --cwd-file="$tmp"
if set cwd (cat -- "$tmp"); and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ]
cd -- "$cwd"
builtin cd -- "$cwd"
end
rm -f -- "$tmp"
end

View file

@ -6,7 +6,7 @@ let
local tmp="$(mktemp -t "yazi-cwd.XXXXX")"
yazi "$@" --cwd-file="$tmp"
if cwd="$(cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then
cd -- "$cwd"
builtin cd -- "$cwd"
fi
rm -f -- "$tmp"
}