Searching for incomplete strings for actions such as shutdown/restart/suspend does not yield any results
STEPS TO REPRODUCE
1. Open krunner
2. Start entering "rest"
3. Alternatively enter full term "restart"
Nothing is found for partial term, while "Restart computer" option is found for full term
Power actions should be found for partial terms as well
Any linux distribution
KDE versions at least 5.18, 5.19 or 5.20, but probably any as well
The issue is so far observed for powerdevil krunner plugin (if i'm not wrong about which module owns those actions), however in theory it may be broader in scope and be present in other plugins as well.
Hmm, where would you draw the line for a partial match? Note that also short trigger words like "sleep" are available.
(In reply to Alexander Lohnau from comment #1)
> Hmm, where would you draw the line for a partial match? Note that also short
> trigger words like "sleep" are available.
As far as i can see, there is no such line for application search ("k" will show you konsole among all things, for example). Can it be done the same way or are there some unwanted consequences?
>Can it be done the same way or are there some unwanted consequences?
The problem is that we would be spamming a lot of unwanted results. Currently the query has to match the term exactly, which makes it very predictable.
Especially considering that we don't want the user to accidentally click the option to shutdown their computer this makes sense.
But technically it is definitely possible.
I will look into implementing this after fixing BUG 428194.
May I assume that the issue mentioned in BUG 324617 should also be kept in mind when implementing this?
(In reply to Alexander Lohnau from comment #5)
> May I assume that the issue mentioned in BUG 324617 should also be kept in
> mind when implementing this?
I can't really comment from my perspective, since russian does not have diacritics... Except for е/ё ([ye]/[yo]), maybe? Those are considered separate letters (both in alphabete, and in practical terms - different keyboard keys, for example), although often considered interchangeable in written language (despite different phonemes).
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/521
Git commit 6f54d49ade5f11f1a5d8f4944e61e0ede7380267 by Alexander Lohnau.
Committed on 27/12/2020 at 21:56.
Pushed by alex into branch 'master'.
Rewrite match logic of PowerDevil runner
- Support partial matches
- Allow both translated and non-translated trigger words
- Avoid duplicating the translated strings. This can become useful in
case we also want to add the non-translated trigger words to the
syntaxes (once they get displayed somewhere ;))
- Get rid of QRegExp usage
Related: bug 428194
M +101 -83 runners/powerdevil/PowerDevilRunner.cpp
M +16 -2 runners/powerdevil/PowerDevilRunner.h