shell.js
shell.js copied to clipboard
add text to shell screen without command input
Hi
I would like to use your script like a terminal screen but want ti add texts after initialize
is is possible to add more commands after initialize without user input?
something like:
const shell = Shell("#shell", ["Hello, world!"], { "user": "root", "host": "ctb", "responsive": true, "shadow": true, }).type();
shell.write('additional output will be here').type();
is it possible?
Hi @ne0c0de, thanks for the suggestion, is a quite interesting feature which makes me think to a possible improvement.
I'm thinking to move the commands
parameter from the constructor to the type
function, therefore each time type
is invoked it prints the new set of commands in the same shell instance – maybe introducing the special clear
command to empty the terminal.
I'm going to consider this feature, but I cannot predict when I will be able to develop it.