Patchwork [0/1] tmux new does not take tw commands

login
register
mail settings
Submitter Peter Seebach
Date June 11, 2013, 2:28 p.m.
Message ID <cover.1370960556.git.peter.seebach@windriver.com>
Download mbox
Permalink /patch/51547/
State New
Headers show

Pull-request

git://git.yoctoproject.org/poky-contrib seebs/tmuxfix

Comments

Peter Seebach - June 11, 2013, 2:28 p.m.
This got routed to me because the visible error message says
	Execution of "pseudo /bin/bash" failed

but actually it's nothing to do with pseudo. The real
problem is that the tmux class in terminal.py is producing
a string like:
	'tmux new <args> {command}'

This then gets .format called on it, substituting in a command. If
the comand is "pseudo /bin/bash", this is:
	'tmux new <args> pseudo /bin/bash'
which is a usage error. It would be okay if it were:
	'tmux new <args> "pseudo /bin/bash"'

So add double quotes. Of course, that assumes that <command> never has
double quotes in it... If it does, that may need a fancier solution.

The following changes since commit b4f208f418d18f2a4e78a56bebacef481061d917:
  Saul Wold (1):
        tar: don't mv tar for nativesdk

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib seebs/tmuxfix
  http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=seebs/tmuxfix

Peter Seebach (1):
  handle two-word commands with tmux

 meta/lib/oe/terminal.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
Chris Larson - June 11, 2013, 2:59 p.m.
On Tue, Jun 11, 2013 at 7:28 AM, Peter Seebach
<peter.seebach@windriver.com>wrote:

> This got routed to me because the visible error message says
>         Execution of "pseudo /bin/bash" failed
>
> but actually it's nothing to do with pseudo. The real
> problem is that the tmux class in terminal.py is producing
> a string like:
>         'tmux new <args> {command}'
>
> This then gets .format called on it, substituting in a command. If
> the comand is "pseudo /bin/bash", this is:
>         'tmux new <args> pseudo /bin/bash'
> which is a usage error. It would be okay if it were:
>         'tmux new <args> "pseudo /bin/bash"'
>
> So add double quotes. Of course, that assumes that <command> never has
> double quotes in it... If it does, that may need a fancier solution.
>

 I'd suggest calling pipes.quote() on the value being passed into format().