Skip to content

yinshuxun/xterm-addon-search-bar

Repository files navigation

xterm-addon-search-bar

Build Status Build Status NPM License

An addon for xterm.js that enables show search bar in terminal. This addon requires xterm.js & xterm-addon-search v4+.

Install

npm install --save xterm-addon-search-bar

Usage

import { Terminal } from 'xterm';
import { SearchAddon } from 'xterm-addon-search';
import { SearchAddonBar } from 'xterm-addon-search-bar';

const terminal = new Terminal();
const searchAddon = new SearchAddon();
const searchAddonBar = new SearchAddonBar({searchAddon});
terminal.loadAddon(searchAddon);
terminal.loadAddon(searchAddonBar);
// Can be uesd in a action as click
searchAddonBar.show();

See the full API for more advanced usage