mirror of
https://github.com/KDE/konsole.git
synced 2026-06-18 18:58:58 -04:00
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
This commit is contained in:
@@ -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 ");
|
||||
|
||||
Reference in New Issue
Block a user