[konsole] [Bug 436357] New: Wish for custom hyperlinks

Phillip Taylor bugzilla_noreply at kde.org
Thu Apr 29 14:24:54 BST 2021


https://bugs.kde.org/show_bug.cgi?id=436357

            Bug ID: 436357
           Summary: Wish for custom hyperlinks
           Product: konsole
           Version: unspecified
          Platform: Other
                OS: Other
            Status: REPORTED
          Severity: wishlist
          Priority: NOR
         Component: general
          Assignee: konsole-devel at kde.org
          Reporter: kde at philliptaylor.net
  Target Milestone: ---

I used to maintain a hacked version of Konsole that gave me a way to turn
certain text into automatic hyperlinks. This blog post explains what I did:

https://blog.philliptaylor.net/the-terminal-with-jira-integration-a-kde-konsole-hack/
https://github.com/PhillipTaylor/konsole/commit/0e5f9a374894a2d3057afd9dcd23478d59da5630

I would absolute adore someone, who could reimplement this in the latest
Konsole and get it into master where it may always be supported. In my mind,
the best "generic" solution that everyone could benefit from is a new page in
the profile section called "Context Links". There would be three columns like
the table below and users can add new ones at the bottom: 

 Context Links Tab
 -----------------

 Regex                Command                 Menu Text

 "http://(.*)"        "xdg-open browser $1"   Open link in browser
 "mailto:(.*)\s"      "xdg-open email $1"     Send mail from email client
 [ space to add more records, 



 Konsole already hardcodes regexs to open websites and email. This   
 is a reimplementation of that feature that allows people to add their own. I
would
 personally benefit from adding a new row like this:

 "MY-JIRA-(\d+)"     "xdg-open browser http://myjira/$1"   "Visit JIRA ticket
in browser"

 but it could suit many other people's needs.

 "[a-z]{8}"          "xdg-open browser http://mygit/commit/$1"  "Open git hash
in my server"
 "(.*).mp3           "xdg-open audioplayer $1.mp3"              "Play MP3 in
audioplayer"
 "/r/(.*)"           "xdg-open browser https://reddit.com/r/$1" "View
subreddit"

The first column is the regex that triggers the underline behaviour, the third
column is the
text to show in the content menu when you right-click on it. The middle column
is the command
to execute when you choose the menu option.

Anyway, this is my idea, I can personally attest to using it for years that
it's super useful. Thank you to all Konsole developers for all your hard work,
which I have depended on for years.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the konsole-devel mailing list