Skip to content

cibinmathew/cycle-fav-dirs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

ZSH plugin to cycle through your favourite directories

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages