Update .config/home-manager/home.nix

Add .config/fish/functions/y.fish
Remove .config/fish/functions/y.fish
This commit is contained in:
2026-02-19 20:33:17 +01:00
parent 4a0df9a038
commit 3bc40854ec
3 changed files with 9 additions and 9 deletions

View File

@@ -25,7 +25,6 @@
duf
gdu
tealdeer
gimp
grim
slurp
wl-clipboard
@@ -120,6 +119,7 @@
programs.yazi = {
enable = true;
enableFishIntegration = true;
shellWrapperName = "y";
settings = {
mgr = {
ratio = [ 1 4 3 ];

View File

@@ -0,0 +1,8 @@
function y
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

View File

@@ -1,8 +0,0 @@
function y
set tmp (mktemp -t "yazi-cwd.XXXXXX")
yazi $argv --cwd-file="$tmp"
if read -z cwd < "$tmp"; and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ]
builtin cd -- "$cwd"
end
rm -f -- "$tmp"
end