Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cibinmathew/cycle-fav-dirs
ZSH plugin to cycle through your favourite directories
https://github.com/cibinmathew/cycle-fav-dirs
zsh zsh-configuration zsh-plugin
Last synced: about 2 months ago
JSON representation
ZSH plugin to cycle through your favourite directories
- Host: GitHub
- URL: https://github.com/cibinmathew/cycle-fav-dirs
- Owner: cibinmathew
- License: mit
- Created: 2022-11-19T10:34:34.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-29T03:38:49.000Z (5 months ago)
- Last Synced: 2024-01-23T17:28:43.905Z (4 months ago)
- Topics: zsh, zsh-configuration, zsh-plugin
- Language: Shell
- Homepage:
- Size: 299 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Lists
- awesome-zsh-plugins - cycle-fav-dirs - A plugin to cycle through your favourite directories. (Plugins / ZSH on Windows)
- fucking-awesome-zsh-plugins - cycle-fav-dirs - A plugin to cycle through your favourite directories. (Plugins / ZSH on Windows)
- fucking-awesome-zsh-plugins - cycle-fav-dirs - A plugin to cycle through your favourite directories. (Plugins / ZSH on Windows)
README
# ZSH Cycle fav dirs
[ZSH](https://www.zsh.org/) plugin to cycle through your favourite directories using a hotkey. Listed on [awesome-zsh-plugins](https://github.com/unixorn/awesome-zsh-plugins#plugins)![screenshot](https://github.com/cibinmathew/cycle-fav-dirs/blob/main/images/cycle-fav-dirs-demo.gif?raw=true)
## Installation
### Using [zplug](https://github.com/zplug/zplug)
```zsh
zplug "cibinmathew/cycle-fav-dirs"
```### Manually
Clone this repository to some dir and then source it in `.zshrc````bash
git clone [email protected]: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
```zsh
CYCLE_FAV_DIRS_CMD='echo "/Users/username/Projects
/Users/username/Downloads
$HOME
"'
```
```zsh
CYCLE_FAV_DIRS_CMD='recent_dirs|head -n 5|uniq -i' # generate dynamically using own scripts
```
```zsh
CYCLE_FAV_DIRS_CMD='cat ~/.z|cut -d"|" -f1' # use list from z[https://github.com/rupa/z]
```2. bind your favourite key
```zsh
bindkey "\es" cycle-fav-dir-next
```
### Sample configuration```zsh
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
+ [dircycle](https://github.com/ohmyzsh/ohmyzsh/blob/master/plugins/dircycle/dircycle.plugin.zsh)
+ [fzf-marks](https://github.com/urbainvaes/fzf-marks)## License
[MIT License](LICENSE)