Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request - search with trailing comment, do not expand comment #1675

Closed
vmalloc opened this issue Aug 27, 2019 · 1 comment
Closed

Comments

@vmalloc
Copy link

vmalloc commented Aug 27, 2019

I had an idea to annotate some of my ZSH history with trailing comments to help me find important commands I use often, so the history entry would be something like:

: 1556195037:0;find . -name "*.JPG" | wc -l # count number of pictures

Then I would be able to use fzf through Ctrl+R and start typing "number of pictures" to find my command.

It would be nice to have an option to tell fzf to expand the entry without the trailing comment to avoid clutter. I'm also ok with having a global toggle for it.

Thanks again for this amazing project!

@junegunn
Copy link
Owner

Makes sense, but I decided not to add more options due to the maintenance burden. (#1492 (comment))

The implementation of the key binding is pretty short and should be straightforward. So consider customizing the function and put it in your .zshrc to override the default implementation.

https://github.com/junegunn/fzf/blob/master/shell/key-bindings.zsh#L66-L83

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants