fzy
fzy copied to clipboard
Add new option 'all' to output all matches
This commit adds the option '--all' / '-a', which will cause fzy to ignore the selection and output all matching lines on return.
I needed this feature so I could call fzy from vim and fill a location-list with the output. I just found fzy today and was pleasantly surprised by how clean the code base is and how easy it was to add new functionality, so I just wrote this small patch. There might be better ways to solve this, possibly without changing fzy. Feel free to reject this PR and point me in a different direction in that case.
I've been using fzy for a day, it's really great! This feature is the only extra thing I really want from it.
@jhawthorn would you be interested in this patch if it was cleaned up and submitted with a test? I'd really like to help get this feature delivered.
In https://github.com/jhawthorn/fzy/pull/40 I added an action_emit_all
which can be bound via the keybinding system added in that PR. This could be an alternative to the -a
flag, or both could be supported with the -a
flag swapping emit
and emit all
bindings.
@lamarpavel I'm going to maintain a fork that accepts contributions from the community at https://github.com/ohjames/fzu until the maintainer here has time to engage with us. It already has the ability to select "all matches" and configurable key bindings.
@ohjames Thank you for notifying me, and thanks to the AUR package I'm already using it.
Cool if you need a flag to make "select all" the default I'll happily accept it :) For me selecting with a binding is best.
That's all right, but maybe you should enable issues in your repo in case someone has comments to things not relevant for fzy (eg. you replaced one fzy -> fzu too many in the readme).