diff --git a/terminatorlib/terminatorterm.py b/terminatorlib/terminatorterm.py index ce85ed0f..94a9cd50 100755 --- a/terminatorlib/terminatorterm.py +++ b/terminatorlib/terminatorterm.py @@ -385,6 +385,9 @@ class TerminatorTerm (gtk.VBox): for item in re.findall(r'[0-9]+',url): url = 'https://bugs.launchpad.net/bugs/%s' % item return url + elif match == self.matches['apturl']: + # xdg-open will work as-is with apt: URLs + pass return url @@ -633,6 +636,8 @@ text/plain # the regular expression is similar to the perl one specified in the Ubuntu Policy Manual - /lp:\s+\#\d+(?:,\s*\#\d+)*/i self.matches['launchpad'] = self._vte.match_add ('\\b(lp|LP):?\s?#?[0-9]+(,\s*#?[0-9]+)*\\b') + self.matches['apturl'] = self._vte.match_add ('\\bapt.*\\b') + def _path_lookup(self, command): if os.path.isabs (command): if os.path.isfile (command):