On Mon, Aug 31, 2026 at 2:22 PM Chris Adams <[email protected]> wrote:
> Once upon a time, Alejandro Lopez <[email protected]> said: > > The simplest solution is to set EDITOR to vi in your whole environment, > not > > only for login shells. In my environment, I set EDITOR to vi in my own > > ~/.bashrc.d/vi file. > > That doesn't work for the case of "sudo visudo", for the same reason > that the vim-default-editor RPM doesn't work: no shell is started. > Yep. I had forgotten but I removed nano, so it is probably using the default (nano:vim:vi). > > > If, for any reason, you cannot set it (for instance, if you want to use > vi > > only for sudo but what to use nano for the rest of the things), you can > set > > the SUDO_EDITOR variable (this is supposed to work but I never tried it). > > That also doesn't work because SUDO_EDITOR is not inherited from the > environment through sudo. > Is it possible for you to use `env_keep` in the sudoers file ? However, based on your first message I think you want to avoid this. -- Alejandro
-- _______________________________________________ devel mailing list -- [email protected] To unsubscribe send an email to [email protected] Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/[email protected] Do not reply to spam, report it: https://forge.fedoraproject.org/infra/tickets/issues/new
