Check if the command entered after : is a prefix of an existing command
and run that. This is only done if there is no complete name matching
first-hand.
Signed-off-by: Vitaly Ovchinnikov <v@postbox.nz>
---
The reason behind the patch is that I want exit aerc with :q - something
that I used to with vim. I tried adding a command alias (quit/exit/q),
but it is added to the completion list which is not good. I also tried
adding a binding: :q = :quit, but it crashes aerc when pressed. So here
is another approach that gives the command a second chance if there is
no direct matching.
I think this is a very good idea (and very vim like). On the other hand I find
calling this a prefix is pretty misleading. I've been trying to look it up how
vim calls this, but can't find it... Anyhow, something more close to "unique
substring" should be more close to what this is?
aerc/patches: SUCCESS in 5m38s
[commands: run a command by its first letters][0] from [Vitaly Ovchinnikov][1]
[0]: https://lists.sr.ht/~rjarry/aerc-devel/patches/44796
[1]: mailto:v@postbox.nz
✓ #1058448 SUCCESS aerc/patches/openbsd.yml https://builds.sr.ht/~rjarry/job/1058448
✓ #1058447 SUCCESS aerc/patches/alpine-edge.yml https://builds.sr.ht/~rjarry/job/1058447