mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-17 03:05:30 -04:00
moved shell alias initialization to extra file; fixed edit manual (wrong parameter char)
This commit is contained in:
parent
ef665390b4
commit
121dce4a93
15
assets/opencomputers/lua/rom/boot/94_shell.lua
Normal file
15
assets/opencomputers/lua/rom/boot/94_shell.lua
Normal file
@ -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")
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user