Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I've moved to https://github.com/ajeetdsouza/zoxide/ from z, as it can also show you a list of matching directories using fzf


    # https://github.com/junegunn/fzf/wiki/Examples#integration-with-z
    # like normal z when used with arguments but displays an fzf prompt when used without.

    unalias z 2> /dev/null

    z() {
      [ $# -gt 0 ] && _z "$*" && return
      cd "$(_z -l 2>&1 | fzf --height 40% --nth 2.. --reverse --inline-info +s --tac --query "${*##-* }" | sed 's/^[0-9,.]* *//')"
    }




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: