diff --git a/plugins/externalscript/externalscriptplugin.cpp b/plugins/externalscript/externalscriptplugin.cpp --- a/plugins/externalscript/externalscriptplugin.cpp +++ b/plugins/externalscript/externalscriptplugin.cpp @@ -137,19 +137,28 @@ item->setCommand( QStringLiteral("g++ -o %b %f && ./%b") ); m_model->appendRow( item ); + #ifndef Q_OS_WIN + item = new ExternalScriptItem; + item->setText( i18n("Sort Selection") ); + item->setCommand( QStringLiteral("sort") ); + item->setInputMode( ExternalScriptItem::InputSelectionOrDocument ); + item->setOutputMode( ExternalScriptItem::OutputReplaceSelectionOrDocument ); + item->setShowOutput( false ); + m_model->appendRow( item ); + item = new ExternalScriptItem; item->setText( i18n("Google Selection") ); item->setCommand( QStringLiteral("xdg-open \"https://www.google.com/search?q=%s\"") ); item->setShowOutput( false ); m_model->appendRow( item ); item = new ExternalScriptItem; - item->setText( i18n("Sort Selection") ); - item->setCommand( QStringLiteral("sort") ); + item->setText( i18n("Paste to Hastebin") ); + item->setCommand( QStringLiteral("a=$(cat); curl -X POST -s -d \"$a\" https://hastebin.com/documents | awk -F '\"' '{print \"https://hastebin.com/\"$4}' | xargs xdg-open ;") ); item->setInputMode( ExternalScriptItem::InputSelectionOrDocument ); - item->setOutputMode( ExternalScriptItem::OutputReplaceSelectionOrDocument ); item->setShowOutput( false ); m_model->appendRow( item ); + #endif config.writeEntry( "firstUse", false ); config.sync();