lf icon indicating copy to clipboard operation
lf copied to clipboard

Add a selection mode

Open laktak opened this issue 3 years ago • 3 comments

When working with lf I prefer to have it use only the selections I made in the current directory.

    selmode        string    (default 'all')

Selection mode for commands.
When set to 'all' it will use the selected files from all directories.
When set to 'dir' it will only use the selected files in the current directory.

Use case: I often forget to clear selections before selecting files in the current directory and have to start over or (worst case) deleted some files by mistake.

laktak avatar Jun 01 '22 19:06 laktak

This is sorely needed, I just tested this, wasn't even aware of this weird behaviour, selection mode should be 'dir' by default indeed. This can really lead to some really nasty surprises.

rafcon-dev avatar Aug 20 '22 12:08 rafcon-dev

@rafcon-dev as I understand it gokcehan is busy with things in real life ... just fyi because I saw you commented on other issues as well.

laktak avatar Aug 23 '22 15:08 laktak

Thank you for the fyi mate. Yeah, such is life indeed, hopefully they'll find some time once things are sorted out!

rafcon-dev avatar Aug 23 '22 16:08 rafcon-dev

Responding to https://github.com/gokcehan/lf/discussions/950

@gokcehan Selection mode in https://github.com/gokcehan/lf/pull/849 has been quite fundamental to lf so far so I fear it might double our reported issues somehow.

I don't quite understand that connection. Are you talking about users not understanding the option? It's off by default.

laktak avatar Oct 10 '22 07:10 laktak

@laktak Thanks for the patch.

gokcehan avatar Oct 15 '22 12:10 gokcehan