-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Add flag to select single result immediately (revisit issue #27) #36
Comments
I've given some thought about it over time, and have come to agree with the need for the option. You have nicely summarized the reasoning behind this. I'll keep you updated on the progress. |
Okay, now we have (/cc @wellle) |
👍 Looks great. I will upgrade soon. |
Wow, thanks for the quick response, Junegunn! A few suggestions:
Thanks again, this is a great utility! Steve On Wed, Apr 2, 2014 at 8:51 AM, Christian Wellenbrock <
|
- Make -0 and -1 work without -q - Change exit status to 0 when exiting with -0
Ah, those are great suggestions. I've changed their behavior as suggested. Thanks! |
Fantastic! Thanks again for putting together such a useful utility! On Wed, Apr 2, 2014 at 12:08 PM, Junegunn Choi notifications@github.comwrote:
|
Works great! |
Issue 27 (#27) requested a --select-single
option to fzf to automatically select a match if there is only one.
While a workaround was provided, I think this is a common enough use case with a complex enough workaround to merit addition of the actual option.
I am using the fq1() workaround heavily, both in the shell but also in vimscript. Having to duplicate this in two places makes me wish I could just simplify both cases to a single --select-single argument.
Besides improving usability, not having to invoke fzf twice (as the workaround does) would preclude having to move large result sets around in memory and across processes, and save a second invocation of the fzf process. That could have a noticeable performance/memory improvement in some cases.
It may make sense to combine this with a --select-zero option to exit if no matches are found.
The text was updated successfully, but these errors were encountered: