Skip to content

[CHANGE-EDITOR]: Change fallback EDITOR from nano to vi#182

Open
kaldown wants to merge 1 commit intojoukewitteveen:masterfrom
kaldown:feature/change-editor
Open

[CHANGE-EDITOR]: Change fallback EDITOR from nano to vi#182
kaldown wants to merge 1 commit intojoukewitteveen:masterfrom
kaldown:feature/change-editor

Conversation

@kaldown
Copy link
Copy Markdown

@kaldown kaldown commented Dec 7, 2020

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

@joukewitteveen
Copy link
Copy Markdown
Owner

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.

@kaldown
Copy link
Copy Markdown
Author

kaldown commented Dec 11, 2020

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 :)

@joukewitteveen
Copy link
Copy Markdown
Owner

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?

@kaldown
Copy link
Copy Markdown
Author

kaldown commented Dec 11, 2020

Looks like I have to open a PR on Arch repo first, in order to save peoples from a bad habit of using nano ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants