[Konsole-devel] Adding custom URL filters

Robert Knight robertknight at gmail.com
Tue Mar 10 14:19:18 UTC 2009


Hi Joe,

There is no built-in option for this but if you don't mind modifying
the source you're looking in the right place.  The regular expression
used with the URL filter is defined at Filter.cpp:488 - if you want
the same functionality as for links then you can just alter this
regexp to include the path formats you want to highlight.

The UrlFilter class extends RegExpFilter which provides highlighting
for arbitrary regular expressions within a single line of the display.
 The filters are set up and attached to the terminal display in
SessionController.cpp:299

Regards,
Robert.


2009/3/10 Joe Lawrence <jdl1291 at gmail.com>:
> I find myself copying and pasting directory paths on the remote session that
> I log into during the day.  I like the way Konsole identifies URLs in the
> buffer and allows the user to copy their address into the clipboard.  Is
> there any current way to configure Konsole to identify a path string and
> offer similar clipboard functionality?  (Note, the remote systems that I log
> into are not Unix, but rather use a %system#module>dir1>dir2>filename path
> nomenclature.  Not to hard to write a regexp for.)
>
> Searching the source code, I see a QRegExp UrlFilter class? at the bottom of
> filter.c that seems to describe what's going on under the hood.  Given that
> my request might not be popular enough to add as a bug/wish, would this be
> the place to start if I wanted to roll a custom built Konsole for this
> purpose?
>
> Thanks,
>
> -- Joe
>
> _______________________________________________
> konsole-devel mailing list
> konsole-devel at kde.org
> https://mail.kde.org/mailman/listinfo/konsole-devel
>
>



More information about the konsole-devel mailing list