Better mechanism to choose the default editor (and avoid vi if possible)?
Manuel Jacob
me at manueljacob.de
Sun Jun 7 11:50:08 UTC 2020
On 2020-06-07 13:35, Marcus Harnisch wrote:
> On 06/06/2020 23.24, Manuel Jacob wrote:
>> In my opinion, on a UNIX-style system, if a distribution targets an
>> audience that includes non-power users, it’s the responsibility of the
>> distribution to set $VISUAL or $EDITOR to a user-friendly default, or
>> patch Mercurial to choose a user-friendly default. We should refrain
>> from doing the distribution’s job. If every application had its own
>> way of choosing an editor, the result wouldn’t be very user-friendly.
>
> Thanks, this was also my conclusion:
Oops. While I skimmed over the thread, I didn’t realize that everything
from my mail was more or less already said in your mail.
> On 06/06/2020 12.29, Marcus Harnisch wrote:
>> As far as I see it, the lowest common denominator is in fact vi.
>> Anything else is up to the distribution package maintainers. They
>> would be responsible for selecting required or recommended packages,
>> sensible-editors and such.
>>
>> People installing Mercurial from source are in the same role as
>> packager maintainers and likewise responsible for their user
>> base. Perhaps the installation instructions should point out more
>> prominently that the system-wide config may need to be adapted with
>> respect to this important user-facing value.
>
> On 06/06/2020 23.24, Manuel Jacob wrote:
>> Is there any standard demanding to open vi if neither $VISUAL nor
>> $EDITOR is defined?
>
> Not explicitly, AFAIK, but there is SUS/POSIX[1] which define vi as the
> standard (full-screen) text editor. That's why I think that *if* a
> hardcoded fallback is to be implemented, vi is perhaps the best choice
> on Unixoid systems.
>
> [1] https://pubs.opengroup.org/onlinepubs/9699919799/
>
> _______________________________________________
> Mercurial mailing list
> Mercurial at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial
More information about the Mercurial
mailing list