
Default Commands
April 29, 2024About 1 min
Default Commands 관련
How to Create an Interactive Terminal Portfolio Website
In this article, you will learn how to create an interactive terminal-based portfolio and a résumé in JavaScript. We'll use the jQuery Terminal library (and a few other tools) to create a website that looks like a real terminal. This article will sho...
How to Create an Interactive Terminal Portfolio Website
In this article, you will learn how to create an interactive terminal-based portfolio and a résumé in JavaScript. We'll use the jQuery Terminal library (and a few other tools) to create a website that looks like a real terminal. This article will sho...
By default, the jQuery Terminal has two default commands:
clear
: this command clears everything on the terminal.exit
: this command exits from nested interpreters.
You can disable them by passing the name to the option and setting it to false. Since we won't use nested interpreters, we can disable exit
:
const term = $('body').terminal(commands, {
greetings: false,
checkArity: false,
exit: false
});
But clear
can be useful. So we can add it to the list of commands:
const command_list = ['clear'].concat(Object.keys(commands));