To evoke Web Shortcuts, we have to specify the keyword in the beginning of the search. This is inconvenient since you might change your mind about searching your local hard drive to the web mid way. I would like the ability to specify the shortcut keyword anywhere in the search term with an escape sequence of one's choice. Something like DuckDuckGo's implementation of bangs would be ideal.
You can do this, the changes are just not immediately applied in KRunner :-)
*** This bug has been marked as a duplicate of bug 391243 ***
Whoops wrong tab :D
While liking the idea of being able to configure them like DuckDuckGo's bangs or the Firefox "Search with ..." feature (@duckduckgo fin the Firefox search bar is the equivalent of duckduckgo: in KRunner).
But I am not sure about changing the syntax of the term which was strictly <shortcut><seperator><query> and has been around for a long time.
What do the others think?
I was the one who originally reported the bug, with a different email account and too lazy to reset the password, as I've forgotten the password to that account.
Anyway, replying to your question:
> But I am not sure about changing the syntax of the term which was strictly <shortcut><seperator><query> and has been around for a long time.
The syntax I'm asking for would still work for the current syntax. It would just extend the current syntax to also include:
I think allowing for more flexibility won't hurt any users who might be habituated to the current syntax, because it would still work.
Can you please give an example how a query would look?
I thought you wanted sth.like the duckduckgo bangs:
!google my cool query
Which you would currently do by:
google:my cool query
I want something like this:
!g my query
my query !g
my !g query
All of them should work and do the same thing. This is how DuckDuckGo works. You can try it out on DuckDuckGo. Being able to customize the indicator symbol (! in this case) would be nice.
Funny, I didn't knew you could do it this way.
And this sounds cool, but I would like to have feedback regarding this idea from other KDE people before trying to implement it.
Sure! Hoping for the best :)
Seems reasonable to me.
Git commit 21d7a0af5416bb2b2ae61df0a9e45b3e8e74df8b by David Faure, on behalf of Alexander Lohnau.
Committed on 04/10/2020 at 09:39.
Pushed by dfaure into branch 'master'.
Support DuckDuckGo bang syntax in Webshortcuts
M +3 -0 autotests/kurifiltertest.cpp
M +10 -2 src/urifilters/ikws/kuriikwsfiltereng.cpp
Git commit 84b547914741e6f6754388cae85cafd67ec2a9a8 by Alexander Lohnau.
Committed on 11/10/2020 at 00:47.
Pushed by alex into branch 'master'.
Allow syntax for DuckDuckGo bangs in Webshortcuts
M +17 -7 runners/webshortcuts/webshortcutrunner.cpp
M +1 -0 runners/webshortcuts/webshortcutrunner.h
Is this all implemented now?