broot icon indicating copy to clipboard operation
broot copied to clipboard

[Feat. request ] range adding to staging area

Open joihn opened this issue 9 months ago • 1 comments

context

assume you have 6 files

file1
file2
file3
file4
file5
file6

Lets assume I want to delect file3 file4 file5 file6. Currently, I have to hit ctrl+g repeatedly to add them to staging area (tedious), to then remove them.

feature

In most GUI exporer (nautilus, windows explorer), you could click to select file3, then shift+click file6, and the whole range would get select (amazing!) I whish broot had such a feature. Maybe ctrl+g to select the first file, then ctrl+shift+g on the last file, and the while range would get added to staging area ?

usecase

I work in ML, where I often have a lot of sequential model checkpoints saved, which eats storage, and I want to easily delete some of them.

ps: by the way, thanks a lot for broot, its an amazing tool !

joihn avatar Mar 27 '25 16:03 joihn

Noted.

In the meantime, here's a trick: is define a verb doing both the action (here adding to staging area) and going to the following line.

{
    key: ctrl-j
    cmd: ":toggle_stage;:line_down"
}
{
    key: ctrl-k
    cmd: ":toggle_stage;:line_up"
}

Canop avatar Mar 27 '25 16:03 Canop