I've tried z and autojump before and have found them unnecessary.
I instead use aliases. This allows my shell history to stay clean and legible. It's also much more customizable.
alias c='cd'
alias b='c ..'
alias bb='c ../..'
...
alias bbbbbbb='c ../../../../../../..'
alias B='bb'
alias Bb='bbb'
...
alias BBBb='bbbbbbb'
...
alias L='eza -la --time-style long-iso --color-scale --color-scale-mode=gradient --hyperlink --no-quotes -FX'
alias Lg='L | rg'
alias Lt='L -T'
alias Ltg='L -T | rg'
alias Ld='L -D'
alias Ldg='L -D | rg'
alias Ltd='Lt -D'
alias Lldg='Ll -D | rg'
alias Ls='L --sort newest'
alias LS='L --sort oldest'
...
alias Lorg='L | sort --key 2 -h --reverse | rg'
alias Lotg='Lt | sort --key 2 -h | rg'
alias Lotrg='Lt | sort --key 2 -h --reverse | rg'
etc.
My bash history is unrestricted. I use FZF to quickly select older commands. This takes the "magic" out of the selection process and lets me know exactly what directory I'll go to.
z foo # cd into highest ranked directory matching foo
z foo bar # cd into highest ranked directory matching foo and bar
z foo / # cd into a subdirectory starting with foo
z ~/foo # z also works like a regular cd command
z foo/ # cd into relative path
z .. # cd one level up
z - # cd into previous directory
zi foo # cd with interactive selection (using fzf)
z foo<SPACE><TAB> # show interactive completions (zoxide v0.8.0+, bash 4.4+/fish/zsh only)
I really want to like Warp, but I just can "untrain" my brain from years of visually grokking terminal outputs. Despite it's features, it's impossible (based on my experience and feature requests in their GitHub account) to recreate my simple and preferred shell prompt that includes git branch, date/time, and full path without tons of extraneous whitespace. It's a small thing, but my brain can't handle it for some reason.
Wait. You can jump to the directory `~/projects/foo/python/bar` by typing `<some_cmd> foo bar` in POB (plain ole' bash)?! That's the main feature I love about zoxide; it's be great if I could do it natively.
Best I can come up with is adding the following to .bashrc:
function jump() {
local current_dir=$(pwd)
local search_pattern="*"
for arg in "$@"; do
search_pattern+="$arg*"
done
local path_found=$(find "$current_dir" -type d -path "$search_pattern" -print -quit)
if [[ -n $path_found ]]; then
cd "$path_found" || return
else
echo "Directory not found from here."
fi
}
You can't use tab complete to easily navigate to a directory with a non-trivial relative path. Zoxide lets you type an arbitrary substring of the directory you want to navigate to, regardless of where you currently are.
zoxide is great, but I find it sometimes annoying when I have directories similarly named and it goes to the historically-more accurate directory than I wanted
https://youtu.be/aghxkpyRVDY