Awesome
ZSH Cycle fav dirs
ZSH plugin to cycle through your favourite directories using a hotkey. Listed on awesome-zsh-plugins
Installation
Using zplug
zplug "cibinmathew/cycle-fav-dirs"
Manually
Clone this repository to some dir and then source it in .zshrc
git clone git@github.com:cibinmathew/cycle-fav-dirs.git ~/.zsh/plugins/cycle-fav-dirs
source ~/.zsh/plugins/cycle-fav-dirs/cyclefavdirs.plugin.zsh
CONFIGURATION
-
Put any of below in your .zshrc configuration to use a custom list of favourites
CYCLE_FAV_DIRS_CMD='echo "/Users/username/Projects /Users/username/Downloads $HOME "'
CYCLE_FAV_DIRS_CMD='recent_dirs|head -n 5|uniq -i' # generate dynamically using own scripts
CYCLE_FAV_DIRS_CMD='cat ~/.z|cut -d"|" -f1' # use list from z[https://github.com/rupa/z]
-
bind your favourite key
bindkey "\es" cycle-fav-dir-next
Sample configuration
zplug "cibinmathew/cycle-fav-dirs" # installs the plugin
# Use a custom list of favourite directories
CYCLE_FAV_DIRS_CMD='echo "/Users
/Users/cibin/Library/Application Support/Sublime Text/Packages/sublime_quickfix_list/images
/Users/cibin/Library/Application Support/Sublime Text/Packages/sublime_quickfix_list/tests
"'
bindkey "\es" cycle-fav-dir-next # Alt-s (or Option-s) to switch through the fav dirs