Open sknick opened 10 years ago
I with you on this, waiting on an answer...
Duuuuuuuuude, I found the answer: overwrite the default handler itself with 'shell.setCommandHandler("_default" '...I found it in https://github.com/sdether/josh.js/blob/master/js/pathhandler.js#L58 ;-)
Sorry guys for being so tardy. I'm currently out of town but in cat @net-ninja's answwer isn't what you were looking for, i will get back to you with an answer next week
This is a great library, but I had some unique considerations that ultimately made me "roll my own" command shell, so to speak. I used this implementation as the basis for mine, but it's not a copy-and-paste reimplementation at all. If you happen to use the Echo 3 framework (and if you don't, I highly recommend it), you might find my implementation useful:
I may be missing something, but it doesn't appear that the API for the shell allows you to simply apply a command handler to any text entered; rather, you must specify command handlers for each possible command the user can run. In my case, I'm trying to use the shell as a front-end to commands that are run via remote SSH on a real Linux system. As a result, I want the remote system to handle the command and simply use the shell to display the result. What would it take to do that? Is that feasible now without a code change? I haven't discovered a way yet.