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

Improve multi-select mode to select all remaining entries. #2175

Closed
6 of 10 tasks
0hax opened this issue Sep 10, 2020 · 3 comments
Closed
6 of 10 tasks

Improve multi-select mode to select all remaining entries. #2175

0hax opened this issue Sep 10, 2020 · 3 comments

Comments

@0hax
Copy link

0hax commented Sep 10, 2020

  • I have read through the manual page (man fzf)
  • I have the latest version of fzf
  • I have searched through the existing issues

Info

  • OS
    • Linux
    • Mac OS X
    • Windows
    • Etc.
  • Shell
    • bash
    • zsh
    • fish

Problem / Steps to reproduce

In multi-select mode, we can select multiple entries using .
It would be great to be able to select all entries below an entry using another key.
For example, say I have below list with my cursor on "3":

1
2
> 3
4
5
6

Pressing the key 'select all entries below current cursor' would select 3, 4, 5 and 6.

That's more a feature request.

@0hax
Copy link
Author

0hax commented Nov 17, 2020

Any idea about that one? I'm fine with trying to implement it if you think it's useful.

@junegunn
Copy link
Owner

Hmm, not really a fan of the idea. In the default layout, you tend to go up from the bottom of the screen with shift-tab instead of going down from above with tab, which means we would need two actions for completeness.

  • select-all-above(-including-the-current-one?)
  • select-all-below

What exactly are you trying to implement with the option? Can you give an example?

@0hax
Copy link
Author

0hax commented Nov 19, 2020

Ah you are right, it would make sense to have a select-all-above option as well then.
I wanted this feature for a very specific example but I think there could be many usage of it.
Say you want to delete half of random files from:
find . | fzf --bind "ctrl-a:select-all+accept" -m | xargs rm -f
It would be convenient to have a select-all-below option in this case because filtering can't help filter only last 50 files for example due to their random names.

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

No branches or pull requests

2 participants