[konsole] [Bug 377412] konsole with -e option breaks previous usage--now requires to specify shell to execute commands

Wolfgang Bauer bugzilla_noreply at kde.org
Mon Nov 23 11:48:59 GMT 2020


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

--- Comment #18 from Wolfgang Bauer <wbauer at tmo.at> ---
(In reply to Michael from comment #15)
> On my KDE neon machine, these both behave differently:
> 
> $ xterm   -e 'echo "hello"; sleep 3'
> $ konsole -e 'echo "hello"; sleep 3'
> 
> The first does what it's supposed to do, while the second fails. The second
> needs to be changed to this for it to work:
> 
> $ konsole -e sh -c 'echo "hello"; sleep 3'
> 
> Am I missing something for why this should be so?

The reason is simple I think:
AFAIK "konsole -e xxx" just runs the command directly and passes it the rest of
the line as arguments.
But the '&&' or ';' are to be parsed by the shell, konsole nor the application
it runs cares about them.

So to fix this IMHO, "konsole -e" would instead need to run the command via a
shell instead, e.g. by prepending "sh -c" itself.

No idea if that would be feasible though, I'm not a konsole developer.

Btw, that hasn't actually changed recently, I can reproduce the same behavior
with konsole 2.14.2 from KDE4...

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the konsole-devel mailing list