vercel/hyper

Add a way for plugins to add xterm addons

開放

#2,903 建立於 2018年4月22日

 (2 則留言) (5 個反應) (0 位負責人)TypeScript (3,558 個分叉)batch import
help wanted🛠 Type: Feature Request

倉庫指標

星標
 (44,582 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

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);

貢獻者指南