kamiyaa / joshuto

ranger-like terminal file manager written in Rust
https://crates.io/crates/joshuto
GNU Lesser General Public License v3.0
3.4k stars 150 forks source link

feat: Add support for command aliases #370

Closed Akmadan23 closed 1 year ago

Akmadan23 commented 1 year ago

I think it can be handy to have the ability to set custom command aliases (such as :q aliased to :quit), so I added a really simple implementation with a HashMap, which works fine for this task. For configuration I chose to put it in the main joshuto.toml because it's optional and if specified, the list isn't likely to be really long. Let me know if it's a welcome feature or if there's something you would do differently.

kamiyaa commented 1 year ago

Looks good, just minor styling. After its fixed I can merge it 👍

Akmadan23 commented 1 year ago

I wasn't aware that cargo-fmt cares about imports order, from now on I'll always double check

kamiyaa commented 1 year ago

Thank you!