All Projects → danieldelcore → Hyper Match

danieldelcore / Hyper Match

Licence: mit
HyperTerm extension which matches regular expressions with predefined commands

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Hyper Match

Hyper Tabs Enhanced
Enhanced Tabs Plugin for Hyper
Stars: ✭ 173 (+1053.33%)
Mutual labels:  hyper, plugin
Hyper Search
Search-text plugin for Hyper.js
Stars: ✭ 146 (+873.33%)
Mutual labels:  hyper, plugin
Hyper Statusline
Status Line Plugin for Hyper
Stars: ✭ 366 (+2340%)
Mutual labels:  hyper, plugin
Hyper Pane
Extension for Hyper.app to enhance pane navigation.
Stars: ✭ 160 (+966.67%)
Mutual labels:  hyper, plugin
Hyper Always On Top
Extension for Hyper.app to optionally keep window always on top
Stars: ✭ 16 (+6.67%)
Mutual labels:  hyper, plugin
Mysql redis replication
MySQL replication to Redis cache server via Ruby, Gearman, triggers, and MySQL UDF (Ubuntu version)
Stars: ✭ 10 (-33.33%)
Mutual labels:  trigger
Swarmmskit
Provisioning a Full MS NanoServer Cluster Swarm on Hyper-V with Consul + Vault + Private Registry + Management UI for your cluster Swarm Docker (all these tools will be configure during the deployment) ... all VMs integrated in an Active Directory Domain or using a Local account. You can use (means configure the FW rules for you !) or disable it ...
Stars: ✭ 13 (-13.33%)
Mutual labels:  hyper
Gs Blog
A simple and easy to use, yet powerful blog for GetSimple. With this plugin, you can create blog posts, sort posts by category, view posts in monthly archives, plus much more.
Stars: ✭ 8 (-46.67%)
Mutual labels:  plugin
Feflow
🚀 A command line tool aims to improve front-end engineer workflow and standard, powered by TypeScript.
Stars: ✭ 942 (+6180%)
Mutual labels:  plugin
Interfacetable v3t
interfacetable_v3t (formerly check_interface_table_v3t)
Stars: ✭ 14 (-6.67%)
Mutual labels:  plugin
Sass Webpack Plugin
[Deprecated] 🌈 Get your stylesheets together
Stars: ✭ 14 (-6.67%)
Mutual labels:  plugin
Emby.plugins.javscraper
Emby/Jellyfin 的一个日本电影刮削器插件,可以从某些网站抓取影片信息。
Stars: ✭ 864 (+5660%)
Mutual labels:  plugin
Findergo
🐢 Open terminal quickly from Finder
Stars: ✭ 862 (+5646.67%)
Mutual labels:  hyper
Retest
Command-line regular expression tester
Stars: ✭ 13 (-13.33%)
Mutual labels:  regex
Whitespace Regex
Regular expression for matching the whitespace in a string.
Stars: ✭ 9 (-40%)
Mutual labels:  regex
Openiterm2
Opening iTerm2 in the current directory.
Stars: ✭ 14 (-6.67%)
Mutual labels:  plugin
Prompt Password
This repository has been archived, use the built-in password prompt in Enquirer instead.
Stars: ✭ 8 (-46.67%)
Mutual labels:  plugin
Metrica Plugin Xamarin
Xamarin plugin for Yandex AppMetrica SDK
Stars: ✭ 12 (-20%)
Mutual labels:  plugin
Lein Fore Prob
A leiningen plugin to make a local copy of a problem from 4clojure
Stars: ✭ 13 (-13.33%)
Mutual labels:  plugin
Moodle Local datacleaner
Reduce, filter, and anonymize moodle data for non-prod environments
Stars: ✭ 12 (-20%)
Mutual labels:  plugin

Hyper Match

WARNING: THIS PROJECT IS DEPRECATED

Hyper v2 now uses xterm.js which supports link detection out of the box.

Mentioned in Awesome Hyper npm

An extension for Hyper that binds commands to patterns detected in the terminal. When a pattern is detected, it is rendered as a hyperlink which will execute your command on click.

Patterns such as urls, email addresses and file paths can be configured to do anything when clicked, for example: open a browser, email client, or file manager.

Inspired by iterm's Triggers. Based on hyperlinks.

Demo

Usage

Install Hyper and add hyper-match to plugins in ~/.hyper.js.

Customizing styles

Add custom styles to termCSS in your ~/.hyper.js.

termCSS: `
    x-screen a {
        color: #ff2e88;
        text-decoration: none;
    }

    x-screen a.hover {
        text-decoration: underline;
    }
`

Configuration

A trigger has the following properties:

  • name: Unique identifier for a trigger
  • pattern: A regular expression
  • strategy: A command to be executed when a link is clicked. hyper-match uses .replace() under the hood to output parameters into the supplied strategy.
    • $&: Inserts the matched substring.
    • $: Inserts the portion of the string that precedes the matched substring.
    • $': Inserts the portion of the string that follows the matched substring.
    • $n: Where n is a positive integer less than 100, inserts the nth parenthesized submatch string, provided the first argument was a RegExp object. Note that this is 1-indexed.
  • options: Regular expression options
  • priority: Defines the weight of a pattern and is used if the pattern conflicts with another
  • linkColor: A CSS color

Example:

module.exports = {
  ...
  config: {
    ...
    'hyper-match': {
        triggers: [
            {
                name: 'date',
                pattern: '^(0[1-9]|1[0-2])[\\/](0[1-9]|[12]\\d|3[01])[\\/](19|20)\\d{2}$',
                options: 'g',
                strategy: 'echo \'$&\' | pbcopy && open "https://calendar.google.com"',
                priority: 1,
                linkColor: '#4285f4',
            },
            {
                name: 'email',
                pattern: '[a-z0-9]+[_a-z0-9\\.-]*[a-z0-9][email protected][a-z0-9-]+(\\.[a-z0-9-]+)*(\\.[a-z]{2,4})',
                options: 'gi',
                strategy: 'echo \'$&\' | pbcopy && open "https://mail.google.com"',
                priority: 2,
            },
            {
                name: 'css-color',
                pattern: '#(?:[a-f\\d]{3}){1,2}\\b|rgb\\((?:(?:\\s*0*(?:25[0-5]|2[0-4]\\d|1?\\d?\\d)\\s*,){2}\\s*0*(?:25[0-5]|2[0-4]\\d|1?\\d?\\d)|\\s*0*(?:100(?:\\.0+)?|\\d?\\d(?:\\.\\d+)?)%(?:\\s*,\\s*0*(?:100(?:\\.0+)?|\\d?\\d(?:\\.\\d+)?)%){2})\\s*\\)|hsl\\(\\s*0*(?:360|3[0-5]\\d|[12]?\\d?\\d)\\s*(?:,\\s*0*(?:100(?:\\.0+)?|\\d?\\d(?:\\.\\d+)?)%\\s*){2}\\)|(?:rgba\\((?:(?:\\s*0*(?:25[0-5]|2[0-4]\\d|1?\\d?\\d)\\s*,){3}|(?:\\s*0*(?:100(?:\\.0+)?|\\d?\\d(?:\\.\\d+)?)%\\s*,){3})|hsla\\(\\s*0*(?:360|3[0-5]\\d|[12]?\\d?\\d)\\s*(?:,\\s*0*(?:100(?:\\.0+)?|\\d?\\d(?:\\.\\d+)?)%\\s*){2},)\\s*0*(?:1|0(?:\\.\\d+)?)\\s*\\)',
                options: 'gi',
                strategy: 'echo \'$&\' | pbcopy',
                priority: 1,
            },
        ]
    }
    ...
  }
  ...
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].