Eyck_of_denesle@lemmy.zip to Open Source@lemmy.mlEnglish · 1 month agoYazi - Blazing fast terminal file manager written in Rust, based on async I/Ogithub.comexternal-linkmessage-square45fedilinkarrow-up11arrow-down10file-text
arrow-up11arrow-down1external-linkYazi - Blazing fast terminal file manager written in Rust, based on async I/Ogithub.comEyck_of_denesle@lemmy.zip to Open Source@lemmy.mlEnglish · 1 month agomessage-square45fedilinkfile-text
minus-squarethingsiplay@beehaw.orglinkfedilinkarrow-up0·1 month agoYes, it’s a simple shell function; needs to be a function in your bashrc, not a script, because cd doesn’t work like that. Just copy the function from https://yazi-rs.github.io/docs/quick-start#shell-wrapper into your .bashrc: yy() { local tmp local cwd tmp="$(mktemp -t "yazi-cwd.XXXXXX")" yazi "${@}" --cwd-file="${tmp}" if cwd="$(cat -- "${tmp}")" && [ -n "${cwd}" ] && [ "${cwd}" != "${PWD}" ]; then builtin cd -- "${cwd}" || return fi rm -f -- "${tmp}" } I use yy instead single y.
minus-squareEyck_of_denesle@lemmy.zipOPlinkfedilinkarrow-up0·1 month agoThank you so much for taking the time to post it. I will add this asap.
minus-squarethingsiplay@beehaw.orglinkfedilinkarrow-up0·edit-21 month agoI forgot that Beehaw will replace the ampersand character to &. So instead copying my code you should copy it from the link above.
Yes, it’s a simple shell function; needs to be a function in your bashrc, not a script, because cd doesn’t work like that. Just copy the function from https://yazi-rs.github.io/docs/quick-start#shell-wrapper into your .bashrc:
yy() { local tmp local cwd tmp="$(mktemp -t "yazi-cwd.XXXXXX")" yazi "${@}" --cwd-file="${tmp}" if cwd="$(cat -- "${tmp}")" && [ -n "${cwd}" ] && [ "${cwd}" != "${PWD}" ]; then builtin cd -- "${cwd}" || return fi rm -f -- "${tmp}" }
I use
yy
instead singley
.Thank you so much for taking the time to post it. I will add this asap.
I forgot that Beehaw will replace the ampersand character to
&
. So instead copying my code you should copy it from the link above.