netctl
netctl copied to clipboard
[CHANGE-EDITOR]: Change fallback EDITOR from nano to vi
Most of the systems have no nano
installed by default.
Personally, I have no $EDITOR
in my root being set.
Think vi
would be safer.
Thanks for the cool product <3
Thanks for this suggestion.
I tried to follow the fallbacks of systemd, which are "editor", "nano", "vim", "vi"
. Back when I wrote it, nano
was part of the then-existing base
group in Arch Linux, so I could assume that the systemd fallback would effectively be nano
for most people.
Now that the base
group is gone, it is indeed good to reevaluate that choice. Given that you and I apparently prefer vi(m) and I have no other way of getting information from the users of netctl, let's change the default to either vi or vim! Personally, I think we can go with vim. Do you think this upsets people (maybe it upsets you?). At any rate, this discussion has a high degree of bike-shedding, since we are talking about a fallback.
Thanks for the extended feedback. I wasn't upset, just
~ sudo netctl edit wlp6s0
/usr/bin/netctl: line 181: exec: nano: not found
Was a bit amusing.
Then I have to remember root
user should have his own $EDITOR
. So it's kinda refreshing knowledge.
More valuable is the pattern:
${EDITOR:-vi}
I never knew it could be used as such. Thanks :)
Personally, I use neovim
:)
I took a look at https://pkgstats.archlinux.de/packages and noted the following (approximate percentages of systems taking part in the statistics):
nano is present on 80% of the systems (from 93% in 2019)
vi is present on 70% of the systems (from 90% in 2019)
vim is present on 50% of the systems (from 50% in 2019)
What would you make of these figures?
Looks like I have to open a PR on Arch repo first, in order to save peoples from a bad habit of using nano
;)