From 42e7686769154dc0ecd2265b5b1baca2739fca6b Mon Sep 17 00:00:00 2001 From: Kurt Hindenburg Date: Sun, 13 Mar 2011 15:53:58 -0400 Subject: [PATCH] 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 --- src/SessionController.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/SessionController.cpp b/src/SessionController.cpp index eaceb863..9eb06c66 100644 --- a/src/SessionController.cpp +++ b/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 ");