-- how to filter the command stream usefully. Typing something like '.lua' is now -- short for 'list .lua', and typing a number is interpreted as a cd command. -- Also, if the typed file is a tar or zip archive, then extract it! add_event('command',function(line) if line:find '^%.%a' then return 'list '..line elseif line:isdigit() then return 'cd '..line elseif path.isfile(line) then if line:endswith {'.tgz','.tar.gz'} then return 'tar xzf '..line elseif line:endswith '.zip' then return 'unzip '..line end end end)