The original behaviour needs to stay if there is 1 arg. If >1 treat them as an 
argv for execv. You'll need to change window_pane_spawn etc totake an argv also 
wp->command and maybe other stuff.

-------- Original message --------
From: J Raynor <jxray...@gmail.com> 
Date: 04/02/2014  08:57  (GMT+00:00) 
To: Nicholas Marriott <nicholas.marri...@gmail.com> 
Cc: tmux-users@lists.sourceforge.net 
Subject: Re: use "--" to mark start of command w/ neww etc to avoid quoting 
 
> Neww doesn't need to get -- it just needs to know how many args it has. The
> -- is to make getopt pass args to neww rather than treating as flags eg
>
> tmux neww -x -- foo -y
>
> Needs to set x flag in args but pass 2 args to neww foo and -y.

I believe the existing code already does this.  Neww just needs
args_upper changed to allow it to have more than 1 arg.

Also, doesn't neww need to get something to avoid breaking existing
behavior?  For example, if someone does 'neww "thingWithA  Space"',
then what should neww do?  Should it assume the existing behavior and
split this into a command of "thingWithA" and an option of "Space"?
Or should it look for a single command called "thingWithA  Space"?

This was why I suggested the -m flag in the original email.  This
would allow neww to keep the existing behavior so as not to break
people's scripts or config files, but allow the new functionality if
desired.
------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users

Reply via email to