]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Prepend "cd" and "clear" commands with a space in the Terminal Panel
authorFrank Reininghaus <frank78ac@googlemail.com>
Sun, 3 Jun 2012 20:50:05 +0000 (22:50 +0200)
committerFrank Reininghaus <frank78ac@googlemail.com>
Sun, 3 Jun 2012 20:50:05 +0000 (22:50 +0200)
This prevents that these commands, which have not been enetered by the
user, but generated automatically, appear in the shell history, provided
that the shell is configured appropriately.

BUG: 204039
FIXED-IN: 4.9.0

src/panels/terminal/terminalpanel.cpp

index c307ce71bbcd9886812a5c81c55f6c527d9ddc9f..dba67f1b407255f3ae27ae3261c20528dd410c0f 100644 (file)
@@ -158,10 +158,10 @@ void TerminalPanel::sendCdToTerminal(const QString& dir)
         }
     }
 
-    m_terminal->sendInput("cd " + KShell::quoteArg(dir) + '\n');
+    m_terminal->sendInput(" cd " + KShell::quoteArg(dir) + '\n');
 
     if (m_clearTerminal) {
-        m_terminal->sendInput("clear\n");
+        m_terminal->sendInput(" clear\n");
         m_clearTerminal = false;
     }
 }