diff --git a/assets/opencomputers/lua/rom/boot/94_shell.lua b/assets/opencomputers/lua/rom/boot/94_shell.lua new file mode 100644 index 000000000..373c4618a --- /dev/null +++ b/assets/opencomputers/lua/rom/boot/94_shell.lua @@ -0,0 +1,15 @@ +local shell = require("shell") + +shell.setAlias("dir", "ls") +shell.setAlias("list", "ls") +shell.setAlias("move", "mv") +shell.setAlias("rename", "mv") +shell.setAlias("copy", "cp") +shell.setAlias("del", "rm") +shell.setAlias("md", "mkdir") +shell.setAlias("cls", "clear") +shell.setAlias("less", "more") +shell.setAlias("rs", "redstone") +shell.setAlias("view", "edit -r") +shell.setAlias("help", "man") +shell.setAlias("?", "man") \ No newline at end of file diff --git a/assets/opencomputers/lua/rom/lib/shell.lua b/assets/opencomputers/lua/rom/lib/shell.lua index cfe835070..1b6fea10f 100644 --- a/assets/opencomputers/lua/rom/lib/shell.lua +++ b/assets/opencomputers/lua/rom/lib/shell.lua @@ -6,9 +6,7 @@ local text = require("text") local shell = {} local cwd = "/" local path = {"/bin/", "/usr/bin/", "/home/bin/"} -local aliases = {dir="ls", list="ls", move="mv", rename="mv", copy="cp", - del="rm", md="mkdir", cls="clear", less="more", rs="redstone", - view="edit -r", help="man", ["?"]="man"} +local aliases = {} local running = setmetatable({}, {__mode="k"}) local isLoading = false diff --git a/assets/opencomputers/lua/rom/usr/man/edit b/assets/opencomputers/lua/rom/usr/man/edit index 2e8a568d1..f54ef27ec 100644 --- a/assets/opencomputers/lua/rom/usr/man/edit +++ b/assets/opencomputers/lua/rom/usr/man/edit @@ -8,8 +8,8 @@ DESCRIPTION A very simple text file editor. To create new files with `edit`, open a file in a writable file system that doesn't exist and save. OPTIONS - -v - view mode, opens file as read only + -r + opens file as read only EXAMPLES edit /tmp/test.txt