This library implements a set of useful features for a rich terminal experience. It is implemented as a modular set of addons for the main XTerm.js library, so it can be used by any application which uses XTerm.js and would benefit from a terminal with these features.
It should not be considered remotely production ready; there are lots of bugs and missing features, and a lot of polish needed before it can be used in a real application.
Since the library is a normal XTerm addon, usage is as straightforward as initialising it and passing it to your terminal's loadAddon
method:
import { Terminal } from 'xterm';
import { NrfTerminalCommander, NrfTerminalConfig } from 'pc-xterm-lib';
const config: NrfTerminalConfig = {
completions: [
{
name: 'my_custom_command',
description: 'Does something interesting',
},
],
commands: {
my_custom_command: () => {
console.log('Doing something...');
},
},
prompt: 'AT[:lineCount]>',
showTimestamps: true,
};
const nrfTerminalCommander = new NrfTerminalCommander(config);
const terminal = new Terminal();
terminal.loadAddon(nrfTerminalCommander);
Please see the diagram below and this presentation for information on how the library is structured.
Please report issues to the Wayland team.
See the LICENSE file for details.