[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: <cmpilato_at_collab.net>
Date: 2002-04-16 01:36:13 CEST

Daniel Stenberg <daniel@haxx.se> writes:

> Ok, Branko quickly pointed out that commands may contain spaces and then my
> patch of course breaks that badly...
>
> The old version works with spaces in the command, while my fix works with
> space-separated options.
>
> I personally always tend to use "emacs -nw" in my $EDITOR...
>
> I don't know what the correct answer is. I'm off to bed! ;-)

This may sound ridiculous, but I'm in a ridiculous sort of mood. :-)
We *could* do a brute-force loop of sorts.

   command = <get command from env>
   loop:
     err = <run command>
     if <err means that command wasn't found> && <command has a space in it>
       while <command has spaces in it>
         <prepend stuff after the last space in command to the args list>
         <remove stuff after the last space in command from command>
         goto loop;
       end
     else
       return err;

      

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Apr 16 01:39:15 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.