vercel/hyper

Add a way for plugins to add xterm addons

オープン

#2,903 opened on 2018/04/22

 (2 件のコメント) (5 件のリアクション) (0 人の担当者)TypeScript (3,558 件のフォーク)batch import
help wanted🛠 Type: Feature Request

Repository metrics

Stars
 (44,582 個のスター)
PR merge metrics
 (PR metrics pending)

説明

xtermjs offers a way to enhance its API: https://xtermjs.org/docs/guides/using-addons/

We need to find a way to let plugins add some addons.

Proposal:

// Plugin side
import * as zmodem from 'xterm/lib/addons/zmodem/zmodem';

exports.getXtermAddons() {
  return zmodem // [zmodem] will work too
}

On Hyper side, we need to execute this method for all plugins (each time they've changed) to get all these addons and apply them with:

  Terminal.applyAddon(pluginAddon);

コントリビューターガイド