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.
The changes if any are to make sure we get a full arg array into our args.c
getopt not a string (from the client and after cmd string parse).
Also neww etc will need to handle multiple args but iirc that wasn't the hard
bit.
-------- Original message --------
From: J Raynor <jxray...@gmail.com>
Date: 04/02/2014 07:56 (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
> I don't think you need to modify getopt, the commands just need to handle a
> variable number of args but I don't remember specifics of what needs to
> change.
I still don't see how I can get "--" passed to neww. For example,
this works fine in tmux 1.8:
tmux neww -- emacs
There's no code in cmd_new_window_exec to handle "--", and since neww
can only take 1 arg, getopt must be consuming it. You'd have to do
"tmux neww -- -- emacs" to get the "--" there, which seems ugly.
------------------------------------------------------------------------------
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