[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] $EDITOR with spaces

From: Alan Shutko <ats_at_acm.org>
Date: 2002-04-16 15:49:22 CEST

Marcus Comstedt <marcus@mc.pp.se> writes:

> That's not how $EDITOR works in other programs (e.g. more) though.

Agreed. The way $EDITOR usually works is "Shove $EDITOR in a system()
call and let whatever shell you happen to use sort it out." Which
means that anything involving spaces, quotes or other wierd characters
is completely at the whim of your shell and nothing the app can do can
fix it.

> The standard interpretation of $EDITOR is that space separates
> arguments, and that you lose if you want to have spaces in its path.
> There is probably some POSIX document that standardizes this. To do
> differently is badness, even if the intentions are good.

Basically, what I'm proposing is making the user set EDITOR to a value
which will work with all programs that use EDITOR, but will reject
certain values which work with other programs. There's nothing I've
found in the Single Unix Specification telling how EDITOR is supposed
to work, and all the examples I've seen are one-word things like "vi"
or "ed".

Of course, another option would be to ignore EDITOR completely as
being useless, or just to say that things fail if you want to invoke
an editor with a space in its name, or a filename that contains any
number of characters special to the shell (because svn can't possibly
quote for them all).

-- 
Alan Shutko <ats@acm.org> - In a variety of flavors!
"I am Barnum of Borg. I say,'There's one assimililated every minute.'"
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Apr 16 15:52:09 2002

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.