Skip to content

Latest commit

 

History

History
69 lines (47 loc) · 1.83 KB

README.md

File metadata and controls

69 lines (47 loc) · 1.83 KB

ZSH Cycle fav dirs

ZSH plugin to cycle through your favourite directories using a hotkey. Listed on awesome-zsh-plugins

screenshot

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

  1. 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]
  2. 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

Inspired by

License

MIT License