[Xfce4-commits] r30252 - libexo/trunk/exo-open

Nick Schermer nick at xfce.org
Fri Jul 10 20:38:05 CEST 2009


Author: nick
Date: 2009-07-10 18:38:05 +0000 (Fri, 10 Jul 2009)
New Revision: 30252

Modified:
   libexo/trunk/exo-open/main.c
Log:
Make run in terminal in xfrun4 work again.


Modified: libexo/trunk/exo-open/main.c
===================================================================
--- libexo/trunk/exo-open/main.c	2009-07-10 18:24:36 UTC (rev 30251)
+++ libexo/trunk/exo-open/main.c	2009-07-10 18:38:05 UTC (rev 30252)
@@ -36,6 +36,7 @@
 #include <exo/exo.h>
 
 
+
 /**
  * For testing this code the following commands should work:
  * 
@@ -43,6 +44,8 @@
  * exo-open http://xfce.org
  * exo-open --launch TerminalEmulator ./script.sh 'something with a space' 'nospace' (bug #5132).
  * exo-open --launch TerminalEmulator ssh -l username some.host.com
+ * xfterm4 -e ssh -l ssh -l username some.host.com (bug #5301, this generates line below)
+ *   exo-open --launch TerminalEmulator 'ssh -l username some.host.com'
  **/
 
 
@@ -163,8 +166,10 @@
               if (i > 1)
                 join = g_string_append_c (join, ' ');
               
-              /* only quote arguments with spaces */
-              if (strchr (argv[i], ' ') != NULL)
+              /* only quote arguments with spaces if there are multiple
+               * arguments to be merged, this is a bit of magic to make
+               * common cares work property, see sample above with xfrun4 */
+              if (argc > 2 && strchr (argv[i], ' ') != NULL)
                 {
                   quoted = g_shell_quote (argv[i]);
                   join = g_string_append (join, quoted);




More information about the Xfce4-commits mailing list