Since making a shell that's both compatible with bash and javascript with autodetection is becaming really complicated (are more trying to allow both to being used on a single script), after reading about tcsh and the fact is not sh-compatible, I think a better solution would be that nsh be a pure clean Javascript shell not so easy to use as everyday shell (something like an improved Node.js REPL) with some command in a Javascript function style and needing to call exec() for external executables, and a sh-compatible interpreter located at /usr/bin/sh or similar purely intended for compatibility with .sh scripts (not for interactive mode, more like dash than bash). This would allow more flexibility and maybe would show sh-compatibility it's not so important, or maybe it would be added in a limited way in the future when it's more clear how to achieve it.
Since making a shell that's both compatible with bash and javascript with autodetection is becaming really complicated (are more trying to allow both to being used on a single script), after reading about tcsh and the fact is not sh-compatible, I think a better solution would be that nsh be a pure clean Javascript shell not so easy to use as everyday shell (something like an improved Node.js REPL) with some command in a Javascript function style and needing to call exec() for external executables, and a sh-compatible interpreter located at /usr/bin/sh or similar purely intended for compatibility with .sh scripts (not for interactive mode, more like dash than bash). This would allow more flexibility and maybe would show sh-compatibility it's not so important, or maybe it would be added in a limited way in the future when it's more clear how to achieve it.
Any thoughts?