mirror of
https://github.com/nix-community/home-manager.git
synced 2025-03-10 02:36:54 +00:00
Calls yazi as `command yazi`, allowing to use "yazi" as `shellWrapperName`. Also defines the wrapper with `programs.fish.functions` instead of `interactiveShellInit`.
8 lines
234 B
Fish
8 lines
234 B
Fish
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" ]
|
|
builtin cd -- "$cwd"
|
|
end
|
|
rm -f -- "$tmp"
|
|
end
|