flake and yazi script

This commit is contained in:
Matt Nish-Lapidus 2025-04-01 14:18:09 -04:00
parent 77a34cc7d1
commit 268ff58ac0
2 changed files with 19 additions and 24 deletions

View file

@ -1,10 +1,5 @@
#!/usr/bin/env fish
function y
set tmp (mktemp -t "yazi-cwd.XXXXXX")
yazi $argv --cwd-file="$tmp"
if set cwd (command cat -- "$tmp"); and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ]
builtin cd -- "$cwd"
end
rm -f -- "$tmp"
wezterm --config-file ~/.config/wezterm/launcher.lua start --always-new-process --cwd (pwd) yazi &
end