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
1 changed files with 5 additions and 1 deletions

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