On Fri, 17.10.14 14:29, Mantas Mikulėnas (graw...@gmail.com) wrote: > > Technically proficient people will set $EDITOR or $VISUAL > > anyway. Non-technical people won't. Non-technical people are likel to > > be totally lost in vi/vim. For those folks probably nano makes a > > better choice, simply because it shows an explanation of they > > supported keys at the bottom of the screen. > > > > Hence, I think doing a logic like this would make sense: > > > > 1) if $EDITOR is set, use it > > 2) otherwise: if $VISUAL is set, use it > > 3) otherwise: if "nano" exists, use it > > 4) otherwise: if "vim" exists, use it > > 5) otherwise: if "vi" exists, use it > > The list of editors seems fine. > > Normally $VISUAL would be first, followed by $EDITOR... > > (But in practice nobody sets them to different values anyway, since no > programs aside from mailx care about the distinction. So it's fine > either way, and just ignoring $VISUAL would be just as good.)
Is there a real distinction between $VISUAL and $EDITOR? environ(7) makes no distinction, have any better docs that clarify the supposed distinction? To me it appears that $VISUAL is a bit more legacy thatn $EDITOR is... Lennart -- Lennart Poettering, Red Hat _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel