Re: Proposition: launch commands using positional arguments command)

2012-08-11 Thread Nicholas Marriott
Possible and probably not too hard. IIRC I started doing it a good while ago but didn't get it finished. I would make it so that you can either do this: $ tmux neww "my command" Or $ tmux neww -- my command Which means you don't have any ambiguity. I think you could either try to make it be d

RE: Proposition: launch commands using positional arguments command)

2012-08-06 Thread Sean Estabrooks
> Date: Sun, 5 Aug 2012 19:54:09 +0200 > From: deb...@jstimpfle.de [...] > Thank you Sean, I didn't know of %q (it actually isn't documented for my > distribution). Can this be considered "safe"? (many shells out there, > and I fear proper escaping is not

Re: Proposition: launch commands using positional arguments command)

2012-08-06 Thread Jens Stimpfle
On Sun, Aug 05, 2012 at 12:18:24PM +, Sean Estabrooks wrote: > #!/bin/bash > A="HELLO" > B="WORLD" > upgradecommand="echo $A $B \$SSH_CONNECTION; cat /etc/passwd; sleep 5" > quoted=$(printf '%q' "$upgradecommand") > tmux new-window -d -t mysession: -n window-remotehost "ssh remotehost > ${quot

RE: Proposition: launch commands using positional arguments command)

2012-08-05 Thread Sean Estabrooks
> Date: Fri, 3 Aug 2012 16:17:56 +0200 [...] > > The only way I could do this programmatically is something like > > $ tmux new-window -d -t mysession: -n window-remotehost "ssh remotehost > \"my shellcommandline on the remote host\"" > > I hope this already shows the problem: Both tmu