Can’t imagine using my system without this.

  • @[email protected]
    link
    fedilink
    32 days ago

    I often use it to navigate into a directory, using it as a directory selector (auto cd on exit). An essential plugin to me is https://github.com/yazi-rs/plugins/tree/main/jump-to-char.yazi , to have a Vim like quick jump with f and a letter and n for next. The default f functionality to filter is now set to F, so I don’t lose that by overriding.

    Still need to handle archives too. I also want to write my own plugins someday if I get to use it more often.

    • @[email protected]OP
      link
      fedilink
      22 days ago

      It does handles all types of archives by default. Encrypted ones too.

      How do you auto cd, I always wanted that but didn’t brother to check docs for it. If I remember correctly it’s by launching it as a shell script.

      • @[email protected]
        link
        fedilink
        3
        edit-2
        21 hours ago

        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:

        EDIT: I forgot that Beehaw will replace the ampersand character to &. So instead copying my code you should copy it from the link above.

        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.

          • @[email protected]
            link
            fedilink
            2
            edit-2
            21 hours ago

            I forgot that Beehaw will replace the ampersand character to &. So instead copying my code you should copy it from the link above.