v0.8.0 - Added help and fetch.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
local loadfile = ...
|
||||
local filesystem = loadfile("/halyde/lib/filesystem.lua")(loadfile)
|
||||
|
||||
_G._OSVERSION = "Halyde 0.7.0"
|
||||
_G._OSVERSION = "Halyde 0.8.0"
|
||||
|
||||
function _G.import(module, ...)
|
||||
local args = table.pack(...)
|
||||
|
||||
@@ -8,7 +8,8 @@ _G.shell = {}
|
||||
_G.shell.workingDirectory = shellcfg["defaultWorkingDirectory"]
|
||||
_G.shell.aliases = shellcfg["aliases"]
|
||||
|
||||
local function parseCommand(command)
|
||||
function _G.shell.run(command)
|
||||
checkArg(1, command, "string")
|
||||
if shell.aliases[command:match("[^ ]+")] then
|
||||
local _, cmdend = command:find("[^ ]+")
|
||||
command = shell.aliases[command:match("[^ ]+")] .. command:sub(cmdend + 1)
|
||||
@@ -79,5 +80,5 @@ while true do
|
||||
-- termlib.cursorPosX = #(shell.workingDirectory .. " > ")
|
||||
-- termlib.cursorPosY = termlib.cursorPosY - 1
|
||||
local shellCommand = read()
|
||||
parseCommand(shellCommand)
|
||||
shell.run(shellCommand)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user