add tests for completions
improve detection of completion support for commands

Enable JavasCript, Lua and Erlang scripts to provide completions