This tiny script, inspired by zshmarks, can be used to create, delete, and navigate marks in Bash and Zsh. It is based on the command-line fuzzy-finder fzf written by Junegunn Choi. Although the script is very short and simple, it is very convenient and can very quickly become an important part of your workflow.
This project is deprecated and will not be maintained any longer!
The new repo formarks does the same work but remove the bash
support. If you are a bash user, please go to the original repo.
Thank you for your attention.
fzf is required to use this plugin. Once this condition is met, it is sufficient to source the script from your shell configuration file. If you are using zsh, the plugin is also compatible with the main plugin managers.
zplug wfxr/fzf-marks
zgen load wfxr/fzf-marks
Most of the key mappings in the search window are the default fzf ones. The most relevant ones are:
- ctrl-n / ctrl-p to go to the next/previous match.
- ctrl-y or Enter to accept a match.
- ctrl-t to toggle a match for deletion.
In Zsh or Bash, the script creates three commands:
- mark to create a new bookmark. For example,
mark work
creates a bookmark labeled work. - jump to jump to a given bookmark using fzf. By default, the script binds this function to ctrl-g.
- dmark to delete marks toggled for deletion.
- lmarks to list all registered marks
Urbain Vaes
Wenxuan Zhang