Command line with autocomplete

 From:  ttype (STRUBE)
7280.4 In reply to 7280.2 
Hi Max, found out your example is not working when running MoI using Wine. moi.filesystem.getPathDelimiter() for some reason returns Ubuntu's / and not Wine's \.

code:
var cmds = [];
var files = moi.filesystem.getFiles(moi.filesystem.getCommandsDir(), '*.js');
for ( var i = 0; i < files.length; i++ ) {
    var fn = moi.filesystem.getFileNameFromPath(files.item(i));
    cmds.push(fn.slice(0, -3));
}
cmds.sort();