[dev] Re: WMII / ruby question about launch method in config.rb

From: Suraj Kurapati <sunaku_AT_gmail.com>
Date: Tue, 8 Dec 2009 10:38:28 -0800

On Tue, Dec 8, 2009 at 9:46 AM, Armando Di Cianno <armando_AT_goodship.net> wrote:
> irb(main):068:0> system(cmd)
> Waiting for Emacs...
> => true
> ... i.e., it works.
>
> irb(main):069:0> launch(cmd)
> sh: emacsclient --alternate-editor emacs foo: command not found
> => true
> ... i.e. it failed to launch.

Thanks, this is a bug indeed. It is solved in this commit:
http://github.com/sunaku/wmiirc/commit/c824cc5888153fc1f51e2aa79b42ed6c60e706d1

> ... so, I guess I'm asking what the intention of the "command =
> words.shelljoin" in the launch method was supposed to really do?
> Would removing the line, which does work, be a good idea overall, or
> am I missing the real intention you had in mind?

Basically, I wanted to avoid shell quoting issues (which arise when
manually constructing a shell command) by making the method-call
arguments into the command's ARGV. See the examples section I added
in the launch() method documentation (at the URL shown above).

Cheers.
Received on Tue Dec 08 2009 - 18:38:28 UTC

This archive was generated by hypermail 2.2.0 : Tue Dec 08 2009 - 18:48:02 UTC