Skip to content

Commit 7907e3c

Browse files
committed
add scm to console when run directly
1 parent bf9b54e commit 7907e3c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

scm.lua

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -843,7 +843,7 @@ function scm:init ()
843843
end
844844

845845
---@param resetPosition boolean | nil
846-
function scm:cli (resetPosition)
846+
function scm:cli (resetPosition, args)
847847
if resetPosition ~= nil and resetPosition == true then
848848
term.setCursorPos(1, 7)
849849
end
@@ -870,12 +870,16 @@ function scm:cli (resetPosition)
870870
term.blit(" ","ffffffffffffffffffffffffffffffff","44444444444444444444444444444444")
871871
term.setCursorPos(1, cursorY)
872872
term.scroll(2)
873+
874+
if args and #args == 0 then
875+
read(nil, nil, shell.complete, "scm ")
876+
end
873877
end
874878

875879
---@param args table
876880
function scm:handleArguments (args)
877881
if #args == 0 then
878-
self:cli()
882+
self:cli(false, args)
879883
return
880884
end
881885

0 commit comments

Comments
 (0)