Version: 1.3 (using KDE 4.3.4) OS: Linux Installed from: Ubuntu Packages When the embedded terminal is open and you change the directory in dolphin, it sends "cd $DIR" to the terminal (where $DIR is the target directory). If the directory name contains some reserved shell characters, like spaces, asterisks or question marks, $DIR is properly quoted. But if the directory name contains '[' or ']', which are also special shell operators (wildcard), the argument doesn't get quoted. To reproduce: 1. Create two directories: "abc" and "ab[c]" 2. Click on "ab[c]" Result: * Dolphin sends "cd ab[c]" to the terminal, going into directory "abc". Expected behavior: * Dolphin sends "cd 'ab[c]'" to the terminal, going into directory "ab[c]".
After doing some more tests, '!' has the same problem. Most interactive shells use '!' as a history recall shortcut. To reproduce: 1. Create a directory named "!!". 2. Change to it. 3. See what happens in the terminal. While you are at it, it should also be a good idea to add '~' to the list of characters that trigger quoting. Recap: add '[', ']', '!' and '~' to the characters in the directory name that trigger the quoting of the parameter to 'cd' sent to the terminal.
i will try to look into this bug
i created a patch adding ~ ! [ and ] to the special letters: can someone review and tell me if i can commit ? Index: kdecore/util/kshell_unix.cpp =================================================================== --- kdecore/util/kshell_unix.cpp (révision 1074635) +++ kdecore/util/kshell_unix.cpp (copie de travail) -265,9 +265,9 @@ inline static bool isSpecial( QChar cUnicode ) { static const uchar iqm[] = { - 0xff, 0xff, 0xff, 0xff, 0xdd, 0x07, 0x00, 0xd8, - 0x00, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x38 - }; // 0-32 \'"$`<>|;&(){}*?# + 0xff, 0xff, 0xff, 0xff, 0xdf, 0x07, 0x00, 0xd8, + 0x00, 0x00, 0x00, 0x38, 0x01, 0x00, 0x00, 0x78 + }; // 0-32 \'"$`<>|;&(){}*?#!~[] uint c = cUnicode.unicode (); return (c < sizeof(iqm) * 8) && (iqm[c / 8] & (1 << (c & 7)));
Thanks a lot Nicolas. Might it be possible that you submit your patch at the review board (http://reviewboard.kde.org)? The patch looks good IMO, but it would be good if more kde-core developers have a look on this... Thank you!
i just created a request : http://reviewboard.kde.org/r/2703/
SVN commit 1081242 by nlecureuil: quote the tilde, square brackets and the exclamation mark Add square brackets as meta Reviewed: http://reviewboard.kde.org/r/2703/ BUG:220092 M +5 -5 kshell_unix.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1081242