1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-11-08 11:36:05 +01:00

yazi: update wrappers not to use cat in subshell

If cat is aliased to bat the non piping operation
in the script might include extra text, use builtins
instead
This commit is contained in:
meck 2025-10-28 16:35:02 +01:00 committed by Austin Horstman
parent 6feb368511
commit 65bf99c579
2 changed files with 3 additions and 3 deletions

View file

@ -1,7 +1,7 @@
function yy
set -l tmp (mktemp -t "yazi-cwd.XXXXX")
command yazi $argv --cwd-file="$tmp"
if set cwd (cat -- "$tmp"); and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ]
if read cwd <"$tmp"; and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ]
builtin cd -- "$cwd"
end
rm -f -- "$tmp"