This is a kind replacement of the deceased marker. It uses fzf
and highlight
- its only requirements. It lets you add a command in the bookmarks and then search through your bookmarks.
For zsh you can use any plugin manager, for example for antigen put in your .zshrc
before antigen apply
:
antigen bundle dzervas/fzf-command-bookmarks
For bash or if you don't want to use a plugin manager with zsh, you can just clone the project somewhere cozy and source the script from your .bashrc
or .zshrc
:
source ~/Lab/fzf-command-bookmarks/fzf-command-bookmarks.sh
# Shortcut to trigger the bookmark addition functionality
bind -x "\"\C-k\":_fzf_command_bookmark_add"
# Shortcut to trigger the bookmark showing functionality
bind -x "\"\C-@\":_fzf_command_bookmark_show"
# Shortcut to trigger the bookmark addition functionality
zle -N fzf-command-bookmark-add-widget _fzf_command_bookmark_add
bindkey '^k' fzf-command-bookmark-add-widget
# Shortcut to trigger the bookmark showing functionality
zle -N fzf-command-bookmark-show-widget _fzf_command_bookmark_show
bindkey '^@' fzf-command-bookmark-show-widget
The bookmarks are saved in a file (~/.fzf-command-bookmarks.txt
by default, managed by FZF_COMMAND_BOOKMARKS_FILE
) in the following notation:
my awesome command##This is the title
There is currently both bash and zsh support but more tests should be conducted (old versions, weird setups, etc.). I don't use fish, so feel free to open an MR.