Skip to content

Instantly share code, notes, and snippets.

@mmedvede
Last active September 19, 2017 16:39
Show Gist options
  • Save mmedvede/47251b50c8178270fcc8 to your computer and use it in GitHub Desktop.
Save mmedvede/47251b50c8178270fcc8 to your computer and use it in GitHub Desktop.
# Terminator plugin that turns all gerrit IDs into clickable links.
# Place this into ~/.config/terminator/plugins/ and then enable it in
# terminator preferences.
# mmedvede
import terminatorlib.plugin as plugin
AVAILABLE = ['GerritIDURLHandler']
class GerritIDURLHandler(plugin.URLHandler):
capabilities = ['url_handler']
handler_name = 'gerritid'
nameopen = "Open gerrit review"
namecopy = "Copy review URL"
match = '\\b(I[0-9a-fA-F]{40})\\b'
def callback(self, url):
return('https://review.openstack.org/#/q/%s' % url)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment