2022-04-30 21:18:10 +03:00
|
|
|
"use strict";
|
|
|
|
|
2021-09-05 02:21:11 +03:00
|
|
|
var commands = {
|
2022-04-30 21:18:10 +03:00
|
|
|
clear: {
|
|
|
|
func: clear,
|
|
|
|
root_only: false,
|
|
|
|
help: {
|
|
|
|
desc: "A command to clear the screen",
|
|
|
|
short_desc: "Clear the screen",
|
|
|
|
examples: ["clear"],
|
|
|
|
},
|
2021-09-05 02:21:11 +03:00
|
|
|
},
|
|
|
|
|
2022-04-30 21:18:10 +03:00
|
|
|
reboot: {
|
|
|
|
func: reboot,
|
|
|
|
root_only: true,
|
|
|
|
help: {
|
|
|
|
desc: "A command to reboot",
|
|
|
|
short_desc: "Reboot",
|
|
|
|
examples: ["reboot"],
|
|
|
|
},
|
2021-09-05 02:21:11 +03:00
|
|
|
},
|
|
|
|
|
2022-04-30 21:18:10 +03:00
|
|
|
help: {
|
|
|
|
func: help,
|
|
|
|
root_only: false,
|
|
|
|
help: {
|
|
|
|
desc: "A command to print help",
|
|
|
|
short_desc: "Print help",
|
|
|
|
examples: ["help", "help help"],
|
|
|
|
},
|
2021-09-05 02:21:11 +03:00
|
|
|
},
|
|
|
|
|
2022-04-30 21:18:10 +03:00
|
|
|
show: {
|
|
|
|
func: show,
|
|
|
|
root_only: false,
|
|
|
|
help: {
|
|
|
|
desc: "A command to show pages",
|
|
|
|
short_desc: "Show page",
|
|
|
|
examples: ["show src", "show"],
|
|
|
|
},
|
2021-09-05 02:21:11 +03:00
|
|
|
},
|
|
|
|
|
2022-04-30 21:18:10 +03:00
|
|
|
cd: {
|
|
|
|
func: cd,
|
|
|
|
root_only: false,
|
|
|
|
help: {
|
|
|
|
desc: "A command to go to pages",
|
|
|
|
short_desc: "Go to a page via an alias",
|
|
|
|
examples: ["cd src", "cd"],
|
|
|
|
},
|
2021-09-05 02:21:11 +03:00
|
|
|
},
|
|
|
|
|
2022-04-30 21:18:10 +03:00
|
|
|
ls: {
|
|
|
|
func: list,
|
|
|
|
root_only: false,
|
|
|
|
help: {
|
|
|
|
desc: "A command to list available pages",
|
|
|
|
short_desc: "List pages",
|
|
|
|
examples: ["ls"],
|
|
|
|
},
|
2021-09-05 02:21:11 +03:00
|
|
|
},
|
|
|
|
|
2022-04-30 21:18:10 +03:00
|
|
|
su: {
|
|
|
|
func: su,
|
|
|
|
root_only: false,
|
|
|
|
help: {
|
|
|
|
desc: "A command to run commands as <b>root</b>, use 'su .' to switch between the users.",
|
|
|
|
short_desc: "Run as root",
|
|
|
|
examples: ["su .", "su reboot"],
|
|
|
|
},
|
2021-09-05 02:21:11 +03:00
|
|
|
},
|
|
|
|
|
2022-04-30 21:18:10 +03:00
|
|
|
passwd: {
|
|
|
|
func: passwd,
|
|
|
|
root_only: true,
|
|
|
|
help: {
|
|
|
|
desc: "A command to change your password",
|
|
|
|
short_desc: "Change password",
|
|
|
|
examples: ["passwd"],
|
|
|
|
},
|
2021-09-05 02:21:11 +03:00
|
|
|
},
|
2021-10-09 03:22:48 +03:00
|
|
|
|
2022-04-30 21:18:10 +03:00
|
|
|
whoami: {
|
|
|
|
func: whoami,
|
|
|
|
root_only: false,
|
|
|
|
help: {
|
|
|
|
desc: "A command to show your current user",
|
|
|
|
short_desc: "Show user",
|
|
|
|
examples: ["whoami"],
|
|
|
|
},
|
2021-10-09 03:22:48 +03:00
|
|
|
},
|
2021-10-09 04:41:12 +03:00
|
|
|
|
2022-04-30 21:18:10 +03:00
|
|
|
echo: {
|
|
|
|
func: echo,
|
|
|
|
root_only: false,
|
|
|
|
help: {
|
|
|
|
desc: "Output a string",
|
|
|
|
short_desc: "Output a string",
|
|
|
|
examples: ["echo hello world"],
|
|
|
|
},
|
2021-10-09 04:41:12 +03:00
|
|
|
},
|
2022-04-30 21:18:10 +03:00
|
|
|
};
|