Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local tCommandHistory = {}
- while not bExit do
- write( shell.dir() .. "> " )
- local sLine = read( nil, tCommandHistory )
- table.insert( tCommandHistory, sLine )
- local tWords = {}
- for match in string.gmatch(sLine, "[^ \t]+") do
- table.insert( tWords, match )
- end
- local sCommand = tWords[1]
- if sCommand then
- shell.run( sCommand, unpack( tWords, 2 ) )
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment