nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit 580eaf29d60734133c11f4ddb4b6aa06cdf33fdc
parent a27da0d75b96277953d5b8615748c696ec39df58
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Thu, 23 Feb 2023 16:47:04 +0100

bindings: set up modern bindings also when binary's name starts with "e"

This allows activating the "modern" bindings without having to pass an
option, by simply invoking nano through a symlink -- for example: `en`
(short for "editor nano"), or `et` (short for "edit"), or just `e`.

Diffstat:
Msrc/nano.c | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/nano.c b/src/nano.c @@ -1853,6 +1853,8 @@ int main(int argc, char **argv) /* If the executable's name starts with 'r', activate restricted mode. */ if (*(tail(argv[0])) == 'r') SET(RESTRICTED); + else if (*(tail(argv[0])) == 'e') + SET(MODERN_BINDINGS); while ((optchr = getopt_long(argc, argv, "ABC:DEFGHIJ:KLMNOPQ:RS$T:UVWX:Y:Z" "abcdef:ghijklmno:pqr:s:tuvwxy!%_0/", long_options, NULL)) != -1) {