Yet another ohmyzsh plugin to quick jump between cmdline directories.
And the design concern is very simple
Add path to bookmarks, return an ordered number.
and use the numbers to switch between dirs finally.
There are also lots of powerfull FS Jumping plugins if this is too simple for your case. But if you also prefer simple and intuitive solution. this plugin can also be a good alternative.
- Ensure both sed are already installed in you cmdline PATH.
- Ensure ohmyzsh already installed.
- Install plugin to ohmyzsh customer plugin dir.
curl -s https://raw.githubusercontent.com/calmzhu/ohmyzsh-plugin-bookmark/main/install.zsh >install.zsh zsh install.zsh $ZSH_CUSTOM
- Add bookmark to the plugins array in your zshrc file.
plugins=(... bookmark)
. - Since alias conflicts, You must disable zsh default alias to use this plugin
# add follow line to .zshrc config
zstyle ':omz:lib:*' aliases no
$ l -a ~ #Add home dir to bookmark
$ l -a /some/dir/path # Add /some/dir/path to bookmark
$ l -a `pwd` #Add current dir to bookmark
$ l # show current dir list
$ c 2 # switch to the 2rd dir in bookmark
$ l -d 2 # delete the 2rd dir from bookmark