Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow for all entered text to be handled by client #22

Open
sknick opened this issue Jun 16, 2014 · 4 comments
Open

Allow for all entered text to be handled by client #22

sknick opened this issue Jun 16, 2014 · 4 comments

Comments

@sknick
Copy link

sknick commented Jun 16, 2014

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.

@stevenseeley
Copy link

I with you on this, waiting on an answer...

@stevenseeley
Copy link

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 ;-)

@sdether
Copy link
Owner

sdether commented Jun 27, 2014

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

@sknick
Copy link
Author

sknick commented Jun 27, 2014

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:

http://echo.nextapp.com/site/node/6843

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants