Canop / broot

A new way to see and navigate directory trees : https://dystroy.org/broot
MIT License
10.64k stars 234 forks source link

Rebind `rename` & behave as builtin verb #836

Closed DanielRivasMD closed 7 months ago

DanielRivasMD commented 7 months ago

Love this software so much!

I have been trying many ways to rebind rename and get the same functionality as with the original binding F2. I have not reached the desired goal. No idea whether it is actually not possible, or simply I have not got the proper config to do so. Either way, guidance would be appreciated.

Cheers

Canop commented 7 months ago

You can't really rebind it, you have to reproduce it. It's not an easy one, as it leverages several advanced verb properties. Here's how you can bind it to alt-r on unix/mac:

    {
        invocation: "rename {new_filename:file-name}"
        external: "mv {file} {parent}/{new_filename}"
        key: alt-r
        leave_broot: false
        auto_exec: false
    }

For Windows, change the external to "cmd /c move /Y {file} {parent}/{new_filename}".

DanielRivasMD commented 7 months ago

Thanks!! I believe I was missing the auto_exec argument, but it makes perfect sense since I saw it on the source code.