I don't really ever overwrite functions, but I believe it should be
shell.programs= function ()
instead of
function shell.programs()
If you are wanting to replace the original shell.programs() with your new code.
However I am not sure, I think the original should work since var=function () is equivalent to function var()
Edit: 2 things:
1. You have a '.', I assume that is on purpose so it is a hidden file, but just in case it was not intended and you did not notice.
2. Just for fun try pairs instead of ipairs, should not make a difference but you never know.
Edited by Quintuple Agent, 25 January 2015 - 12:41 AM.