mirror of
https://github.com/nix-community/home-manager.git
synced 2026-01-12 01:50:44 +08: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:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user