News for hackers. Stuff that matters.
Re:Yazi: Fast terminal file manager based on async I/O by BaculumMeumEst on Saturday September 16, 2023 @01:18PM (#37536673)
It looks pretty cool! A nice feature of nnn is that you can set it up to `cd on quit`, meaning when you navigate to a different folder and then quit the program, your original shell navigates to that folder. Is that possible in Yazi?
Re:Yazi: Fast terminal file manager based on async I/O by sxyazi on Saturday September 16, 2023 @02:34PM (#37537336)
The README includes are you looking for: https://github.com/sxyazi/yazi#usage
Re:Yazi: Fast terminal file manager based on async I/O by BaculumMeumEst on Saturday September 16, 2023 @02:46PM (#37537461)
Gah. I need to skim better. Thanks. Here is a translation for anyone else who uses fish. Just hit it with a :%s/^\n//g to fix the formatting.

# Rename this file to match the name of the function

# e.g. ~/.config/fish/functions/ya.fish

# or, add the lines to the 'config.fish' file.

function ya

    set tmp (mktemp -t "yazi-cwd.XXXXX")

    yazi --cwd-file="$tmp"

    if set cwd (cat -- "$tmp") && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]

        cd -- "$cwd"

    end

    rm -f -- "$tmp"
end