Bug 295648 - Command " konsole -e 'man ls' " does not work, while "konsole -e man ls" works fine
Summary: Command " konsole -e 'man ls' " does not work, while "konsole -e man ls" work...
Status: RESOLVED LATER
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: 2.8.999
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-10 04:28 UTC by Jekyll Wu
Modified: 2014-09-14 12:44 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jekyll Wu 2012-03-10 04:28:49 UTC
The code for the "-e" option is problematic. It is only prepared for the case like " konsole -e man ls" where users do not quote the whole command. For the case of "konsole -e 'man ls' ", Konsole just fails.

This report is just for the record.  I have prepared a patch and will push it when I'm more confident that it really works and causes no regressions.
Comment 1 Jekyll Wu 2012-03-10 05:29:28 UTC
Git commit aa75fc8fee7e55e0c78640fcbed0bf0627ba7971 by Jekyll Wu.
Committed on 10/03/2012 at 05:12.
Pushed by jekyllwu into branch 'master'.

konsole -e 'man ls' should work as expected
FIXED-IN: 4.9.0

M  +18   -4    src/Application.cpp
M  +4    -1    src/ShellCommand.h

http://commits.kde.org/konsole/aa75fc8fee7e55e0c78640fcbed0bf0627ba7971
Comment 2 Jekyll Wu 2012-11-01 05:36:53 UTC
Git commit 4d194b20c055a68fb72f2f41b5a67c7afa6d51f7 by Jekyll Wu.
Committed on 01/11/2012 at 06:28.
Pushed by jekyllwu into branch 'master'.

Revert the support for konsole -e "command arguemnts"

Although that looks like a nice feature, it makes the code more
complicated and causes problems when that command is an absolute path
containing spaces.

So for now the only supported way is:

   konsole -e command arguments

This reverts commit aa75fc8fee7e55e0c78640fcbed0bf0627ba7971

M  +6    -14   src/Application.cpp

http://commits.kde.org/konsole/4d194b20c055a68fb72f2f41b5a67c7afa6d51f7
Comment 3 Jekyll Wu 2012-11-01 05:38:56 UTC
Git commit 48b5575c174fb4edb6d3388d7a22dec148dea8cb by Jekyll Wu.
Committed on 01/11/2012 at 06:28.
Pushed by jekyllwu into branch 'KDE/4.9'.

Revert the support for konsole -e "command arguemnts"

Although that looks like a nice feature, it makes the code more
complicated and causes problems when that command is an absolute path
containing spaces.

So for now the only supported way is:

   konsole -e command arguments

This reverts commit aa75fc8fee7e55e0c78640fcbed0bf0627ba7971
(cherry picked from commit 4d194b20c055a68fb72f2f41b5a67c7afa6d51f7)

M  +6    -14   src/Application.cpp

http://commits.kde.org/konsole/48b5575c174fb4edb6d3388d7a22dec148dea8cb
Comment 4 Jekyll Wu 2012-11-01 05:43:31 UTC
Not sure this is really worthwhile. Close it for now.
Comment 5 Kurt Hindenburg 2014-09-13 14:55:34 UTC
Git commit bd56dba1a9e52180a88e8fbd0c6adaf216a852d5 by Kurt Hindenburg.
Committed on 13/09/2014 at 14:49.
Pushed by hindenburg into branch 'KDE/4.14'.

Allow the -e command line to work w/ arguments w and w/o spaces

This allows both these lines to work:
konsole -e man ls
konsole -e "man ls"

Thanks to Mark Raymond markr raymonds org uk for patch/testing.
REVIEW: 120001
FIXED-IN: 4.14.2

M  +13   -6    src/Application.cpp

http://commits.kde.org/konsole/bd56dba1a9e52180a88e8fbd0c6adaf216a852d5
Comment 6 Kurt Hindenburg 2014-09-14 12:44:41 UTC
Git commit d8be35b5c7b93a324ed88f257785c2251f7cc964 by Kurt Hindenburg.
Committed on 13/09/2014 at 14:49.
Pushed by hindenburg into branch 'master'.

Allow the -e command line to work w/ arguments w and w/o spaces

This allows both these lines to work:
konsole -e man ls
konsole -e "man ls"

Thanks to Mark Raymond markr raymonds org uk for patch/testing.
REVIEW: 120001
FIXED-IN: 4.14.2
(cherry picked from commit bd56dba1a9e52180a88e8fbd0c6adaf216a852d5)

M  +13   -6    src/Application.cpp

http://commits.kde.org/konsole/d8be35b5c7b93a324ed88f257785c2251f7cc964