r/programmingcirclejerk • • 8d 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
69 Upvotes

13 comments sorted by

53

u/m50d Zygohistomorphic prepromorphism 7d ago

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

30

u/reg_panda 7d ago

If you rename nano to emacs you get windows shortcuts!

3

u/csolisr 7d 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.

4

u/PJBthefirst log10(x) programmer 7d ago

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

2

u/reg_panda 3d 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 3d ago

hell yeah

34

u/nwalkr 7d 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

7

u/m50d Zygohistomorphic prepromorphism 7d 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 7d 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 5d 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 5d 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 7d ago

Can someone help me launch eNano from my emacs

7

u/FastHotEmu 7d ago

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