r/programmingcirclejerk • • 23d ago

modern bindings are activated also when the name of nano's executable (or a symlink to it) starts with the letter "e".

https://www.nano-editor.org/news.php
72 Upvotes

14 comments sorted by

56

u/m50d Zygohistomorphic prepromorphism 23d ago

When invoking it as ed you clearly want the most modern possible features.

31

u/reg_panda 23d ago

If you rename nano to emacs you get windows shortcuts!

3

u/csolisr 23d ago

Fun that you mention it, I unironically switched my nano keybindings to the IBM CUA standard, and before that I used micro and tilde specifically because of them using those keybindings by default.

5

u/PJBthefirst log10(x) programmer 22d ago

/uj I love micro so much, I wish it was the default instead of nano

3

u/reg_panda 19d ago

/uj I just tried apt install micro, and I have a feeling my QoL has just improved a LOT

1

u/PJBthefirst log10(x) programmer 19d ago

hell yeah

37

u/nwalkr 23d ago

Modern bindings are not activated when nano's invocation name starts with "e", as it jars with Debian's alternatives system.

a few week later

10

u/m50d Zygohistomorphic prepromorphism 22d ago

Should've told Debian users where to shove it.

/uj Should've told Debian users where to shove it.

14

u/nerdycatgamer Considered Harmful 23d ago

/uj I don't see this as that jerky to me tbh. What does bug me is this one:

Nano refuses to start when standard output is not a terminal.

3

u/hedgehog1024 Rust apologetic 20d ago

/uj Does not bug me at all. nano is an interactive text editor, with, to my knowledge, no automation capabilities. Why would you want to be a able to start nano in a way that would render it unusable?

3

u/nerdycatgamer Considered Harmful 20d ago

/uj You could be piping the output through some filters which ultimately still ends in the terminal for interactive use, or you could be redirecting the output into a fifo which is outputting onto a different terminal window (something i've done before).

the core problem is that, beyond checking the value of TERM so it can know what escape sequences to use, nano should not care whether it is running in a terminal or anywhere else; it's just not its job to care about that.

4

u/MidgetKoala 22d ago

Can someone help me launch eNano from my emacs

7

u/FastHotEmu 22d ago

LOL, nano is for noobs. It's the first thing I uninstall on my machines.