Fixed KRun::shellQuote
Oswald Buddenhagen
ossi at kde.org
Sat Aug 6 09:23:47 BST 2005
On Fri, Aug 05, 2005 at 12:50:51PM +0200, Alexander Rigbo wrote:
> I wrote a fix for #109693 (Konsole bookmark incompatibility with mc),
>
i'm not opposed to the idea in general, simply because it makes the
resulting commands more readable (in case somebody would care :).
however, once quoting is used at all, the whole string should be quoted
in bulk, probably with double quotes (escaping only \"$` in it), as
"quoted" single quotes in a single-quoted string are outright unreadable.
anyway, regarding the current variant:
- the double quote is missing from the list
- there should be a comment why the backslash needs to be first
- constructing a temp string and iterating a second time on match is
nonsense. the insert() variant works well if used in a loop with an
offset to find().
- i'm not sure, but it might be faster to use a regexp matching a set
instead of iterating the whole string over and over again
--
Hi! I'm a .signature virus! Copy me into your ~/.signature, please!
--
Chaos, panic, and disorder - my work here is done.
More information about the kde-core-devel
mailing list