Yazi ("duck" in Chinese) is a terminal file manager written in Rust, based on non-blocking async I/O. It aims to provide an efficient, user-friendly, and customizable file management experience.
There is a wrapper of yazi, that provides the ability to change the current working directory when yazi exiting, feel free to use it:
Yazi automatically selects the appropriate preview method for you, based on the priority from top to bottom. That's relying on the $TERM, $TERM_PROGRAM, and $XDG_SESSION_TYPE variables, make sure you don't overwrite them by mistake!
For instance, if your terminal is Alacritty, which doesn't support displaying images itself, but you are running on an X11/Wayland environment, it will automatically use the "Window system protocol" to display images -- this requires you to have Überzug++ installed.