Re: Interpreting EDITOR/VISUAL environment variables.

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

 



David Kastrup <dak@xxxxxxx> writes:

> Actually, splicing $EDITOR into a system command is a nuisance because
> it means having to shell-quote its arguments.  So the current
> interpretation is likely easier to maintain.
>
> Is it the correct one?

I've been torn on this one.  From the point of view of
"specified behaviour in the documentation", which is "EDITOR and
VISUAL name the editor of your choice", not splicing is not
violating the letter (I am not talking about our documentation
here, but many other programs').  Splicing and shell quoting
other parameters, while it is technically not a problem at all
doing that in scripts, feels "dirty".  Maybe it's just me.

Both cvs and svn seems to splice, I suspect they just do a
straight system(3) invocation.

We recently normalized the script callers not to splice at all
(the scripts were hand-rolling "the VISUAL or EDITOR or vi" and
slightly differently).  It obviously has negative (i.e. setting
EDITOR to "emacsclient --alternate-editor vi" does not work) as
well as positive side (i.e. "/home/dak/My Programs/editor" would
work).

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux