Published: 2025-02-12
zoxide
zoxide is a smarter cd command inspired by z and autojump. It remembers frequently used directories, so you can “jump” to the right location by typing just a few characters.
Installation
OSX
brew install zoxide
zsh - Add the following line to ~/.zshrc
eval "$(zoxide init zsh)"
Commands
z proj # proj가 들어간 방문 기록 중 최고 랭크로 이동
z proj api # proj 다음 api가 매칭되는 경로로 이동
z proj / # proj로 시작하는 하위 디렉터리 쪽으로 이동
z proj/ # 현재 위치 기준 relative path로 이동
zi proj # fzf로 후보 고르기
# cd처럼 쓰기
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 # interative
z foo<SPACE><TAB> # show interactive completions (zoxide v0.8.0+, bash 4.4+/fish/zsh only)
Topics:
Link::
Category: Wiki/Tech