1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-01-12 02:10:30 +00:00

Merge pull request #239 from Wilma456/shellprog

Make shell.programs filter .lua extension
This commit is contained in:
Daniel Ratcliffe 2017-05-16 23:00:14 +01:00 committed by GitHub
commit fb00698557

View File

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