1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2024-06-26 07:03:22 +00:00

Make shell.programs filter .lua extension

This commit is contained in:
Wilma456 2017-05-13 13:37:18 +02:00 committed by GitHub
parent 922818dfa5
commit 516bd8cf03

View File

@ -180,7 +180,11 @@ function shell.programs( _bIncludeHidden )
-- Sort and return
local tItemList = {}
for sItem, b in pairs( tItems ) do
table.insert( tItemList, sItem )
if sItem:find(".lua") == sItem:len()-3 then
table.insert( tItemList, sItem:sub(1,-5) )
else
table.insert( tItemList, sItem )
end
end
table.sort( tItemList )
return tItemList