Bug 507837 - Search providers fail if the keyword is 'man'
Summary: Search providers fail if the keyword is 'man'
Status: CONFIRMED
Alias: None
Product: frameworks-kio
Classification: Frameworks and Libraries
Component: general (other bugs)
Version First Reported In: 6.16.0
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: KIO Bugs
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2025-08-04 05:08 UTC by pallaswept
Modified: 2025-08-12 21:12 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description pallaswept 2025-08-04 05:08:23 UTC
SUMMARY
Search does nothing if the keyword is "man"

STEPS TO REPRODUCE
1. Create a new search provider in Konsole, or edit an existing one (or have one already like me)
2. Use the keyword "man" (you may have as many as you like so long as "man" is one)
3. Highlight text, right-click it and select "Search for $text with..." and choose your search provider

OBSERVED RESULT
Nothing at all

EXPECTED RESULT
Search in my browser

SOFTWARE/OS VERSIONS
> kinfo
Operating System: openSUSE Tumbleweed 20250801
KDE Plasma Version: 6.4.3
KDE Frameworks Version: 6.16.0
Qt Version: 6.9.1
Kernel Version: 6.15.8-1-default (64-bit)
Graphics Platform: Wayland
Processors: 24 × AMD Ryzen 9 5900X 12-Core Processor
Memory: 32 GiB of RAM (31.2 GiB usable)
Graphics Processor: NVIDIA GeForce RTX 3090


ADDITIONAL INFORMATION

I have an existing search shortcut, the .desktop file looks like so:

/home/pallaswept/.local/share/kf6/searchproviders/mankier.desktop
[Desktop Entry]
Charset=
Hidden=false
Keys=man,mankier
Name=mankier
Query=https://www.mankier.com/full-text-search?q=\\{@}
Type=Service

It recently suddenly stopped working, but none of my other search providers were effected. A few tries deleting and recreating it got me to discover that the keyword is what breaks it.
Comment 1 TraceyC 2025-08-08 17:05:26 UTC
I can confirm this on git-master

Easy steps to reproduce:
Create a custom search through System Settings - Plasma Search - Web Search, using mankier and the parameters from the example .desktop file
- Using "ddg:thing" brings up DuckDuckGo in a browser as expected
- With "mn" as the keyword for mankier, it works as expected
- With "man" as the keyword for mankier, typing "man" in KRunner shows "Locations: Go to "man:/
Comment 2 Jonathan Marten 2025-08-09 18:28:06 UTC
This probably because "man" is already a known protocol for viewing man pages, for example "man:cat" will display the manual page for the cat(1) command in KHelpCenter.  "man:/" or just "man:" will go to the top level manual page index.

A similar problem, although perhaps even more serious, would happen for example if you tried to create a keyword "http" or "file".

Therefore this is working as expected, although it could be argued that the Web Search KCM should warn or not allow a keyword which duplicates a known protocol name.
Comment 3 TraceyC 2025-08-11 16:41:27 UTC
(In reply to Jonathan Marten from comment #2)
> This probably because "man" is already a known protocol for viewing man
> pages, for example "man:cat" will display the manual page for the cat(1)
> command in KHelpCenter.  "man:/" or just "man:" will go to the top level
> manual page index.

While that sounds logical, this used to work and recently stopped working.