mirror of
https://github.com/nix-community/home-manager.git
synced 2025-11-08 11:36:05 +01:00
If cat is aliased to bat the non piping operation in the script might include extra text, use builtins instead
8 lines
227 B
Fish
8 lines
227 B
Fish
function yy
|
|
set -l tmp (mktemp -t "yazi-cwd.XXXXX")
|
|
command yazi $argv --cwd-file="$tmp"
|
|
if read cwd <"$tmp"; and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ]
|
|
builtin cd -- "$cwd"
|
|
end
|
|
rm -f -- "$tmp"
|
|
end
|