Allow user to enter commands as bookmarks.

Previously, bookmarks where converted to KUrls and then only protocols
Konsole knew about internally were processed.  Now if a bookmark has no
KUrl protocol, Konsole just sends the bookmark to the shell.
This will solve issues such as 'ssh user@server -p port tail -f file'
as well as allowing any command to be a bookmark.

BUG: 88867
BUG: 203263
BUG: 253894
BUG: 185962
BUG: 213644
FIXED-IN: 4.6.2
wilder-portage
Kurt Hindenburg 15 years ago
parent 1d657aed8f
commit 42e7686769
  1. 8
      src/SessionController.cpp

@ -247,6 +247,14 @@ void SessionController::openUrl( const KUrl& url )
QString path = url.toLocalFile();
_session->emulation()->sendText("cd " + KShell::quoteArg(path) + '\r');
}
else if (url.protocol().isEmpty())
{
// KUrl couldn't parse what the user entered into the URL field
// so just dump it to the shell
QString command = url.prettyUrl();
if (!command.isEmpty())
_session->emulation()->sendText(command + '\r');
}
else if ( url.protocol() == "ssh" )
{
_session->emulation()->sendText("ssh ");

Loading…
Cancel
Save