[Konsole-devel] [Bug 188230] New: konsole command line parsing in profile broken (number of unquoted spaces is not ignored)

Achim Bohnet ach at mpe.mpg.de
Fri Mar 27 08:15:03 UTC 2009


https://bugs.kde.org/show_bug.cgi?id=188230

           Summary: konsole command line parsing in profile broken (number
                    of unquoted spaces is not ignored)
           Product: konsole
           Version: 2.2.1
          Platform: unspecified
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: NOR
         Component: general
        AssignedTo: konsole-devel at kde.org
        ReportedBy: ach at mpe.mpg.de


Version:           2.2.1 (using 4.2.1 (KDE 4.2.1), Kubuntu packages)
Compiler:          cc
OS:                Linux (x86_64) release 2.6.28-11-generic

To reproduce:

test script that prints it's command line arguments:

$ cat /usr/local/bin/listargs
#!/bin/bash
echo -n args:
for a; do
        echo -n " <$1>"
        shift
done
echo
read


and my two test profile that differ in the number of unquoted spaces in the
command line of the profile:

diff -u .kde/share/apps/konsole/test*
--- .kde/share/apps/konsole/test autsch.profile 2009-03-27 08:53:28.000000000
+0100
+++ .kde/share/apps/konsole/test okay.profile   2009-03-27 08:52:54.000000000
+0100
@@ -3,8 +3,8 @@
 Font=DejaVu Sans Mon,10,-1,2,50,0,0,0,0,0

 [General]
-Command=listargs  foo  bar   "bla bla"
-Name=test autsch
+Command=listargs foo bar "bla bla"
+Name=test okay
 Parent=FALLBACK/
 RemoteTabTitleFormat=%h : %u
 ShowNewAndCloseTabButtons=true


Output of profile 'test okay' in konsole:

args: <foo> <bar> <bla bla>

Output of profile 'test autsch' in konsole:

args: <> <foo> <> <bar> <> <> <bla bla>

That's IMHO a bug 'test autsch' should give the same result as 'test okay'. 
Shells always split on word boundries and never cared about
more than one unquoted white space.  No. of spaces in command line
field is hard to spot for the user.

Achim

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the konsole-devel mailing list