Rename /halyde/shell to /halyde/scripts
The reason is because there will have to be a place to put scripts that are not apps.
This commit is contained in:
@@ -1 +1 @@
|
|||||||
["/halyde/shell/shell.lua"]
|
["/halyde/scripts/shell.lua"]
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ while true do
|
|||||||
if workingDirectory:sub(-1, -1) ~= "/" then
|
if workingDirectory:sub(-1, -1) ~= "/" then
|
||||||
workingDirectory = workingDirectory .. "/"
|
workingDirectory = workingDirectory .. "/"
|
||||||
end
|
end
|
||||||
local shellCommand = terminal.read("shell", shellcfg.prompt:format(workingDirectory))
|
local shellCommand = terminal.read({readHistoryType = "shell", prefix = shellcfg.prompt:format(workingDirectory)})
|
||||||
shell.run(shellCommand)
|
shell.run(shellCommand)
|
||||||
gpu.freeAllBuffers()
|
gpu.freeAllBuffers()
|
||||||
end
|
end
|
||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
local filesystem = require("filesystem")
|
local filesystem = require("filesystem")
|
||||||
|
|
||||||
-- get a list of installed shells
|
-- get a list of installed shells
|
||||||
local shellDir = filesystem.list("/halyde/shell/")
|
local shellDir = filesystem.list("/halyde/scripts/") -- HACK: /halyde/scripts features more than just shells!
|
||||||
local shells = {}
|
local shells = {}
|
||||||
for i=1,#shellDir do
|
for i=1,#shellDir do
|
||||||
table.insert(shells,string.match(shellDir[i],"([^/]+)%.lua$"))
|
table.insert(shells,string.match(shellDir[i],"([^/]+)%.lua$"))
|
||||||
|
|||||||
Reference in New Issue
Block a user