[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Preferred editor and pager



Bruce:
> I think it's OK to provide a /bin/editor and /bin/pager, but they should
> be shell programs with this behavior:
>   [ use VISUAL, EDITOR, PAGER, &c ]
...
>         If the above fails, run the default editor (or pager) from
>         /etc/alternatives/editor.

This is suboptimal for two reasons.  Firstly, if VISUAL, EDITOR or
PAGER is set then /usr/bin/{editor,pager} should not be called - so
you're adding a copy of a level of indirection at a point where that
level ought already to have been handled.

Secondly, /etc/alternatives has as a standard feature that the name in
/etc/alternatives corresponds to a name somewhere in the rest of the
filesystem.

> We should continue to encourage maintainers to have their programs use
> the environment variables $VISUAL, $EDITOR, and $PAGER.

Programs that do not do this are defective, and this is easily
remedied.  It will be simpler to fix the few of these than to contrive
a separate scheme just for this problem.

If there _really_ are programs that can't be fixed we can put scripts
with the functionality you describe in /usr/lib somewhere.

Ian.


Reply to: