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

Interactive command line #49

Open
fabienrenaud opened this issue Oct 30, 2015 · 2 comments
Open

Interactive command line #49

fabienrenaud opened this issue Oct 30, 2015 · 2 comments

Comments

@fabienrenaud
Copy link

I can't use airline to build a personal interactive command line, can I?
Classic example of such:

php -a;
python;
mysql;

Then you type all the commands within and it works.

I know it doesn't make sense for all the applications which provide an interactive terminal, but it would be very convenient for the ones that just want to be a subset of what terminal commands are...

Edit: less than 1 minute later after writing this post, i re-read the README and i believe this is actually possible. :) (and -_- on me)
Will confirm soon.

@fabienrenaud
Copy link
Author

Short answer: it can be done and it's easy.

But:

  • i must provide a name for the cli builder. for an interactive shell, i need none.
  • i can't really benefit of the help module/command provided by airline because it would automatically print out the 'usage' which i don't need in my case.

And I also just found out that the scope of all my command classes must be public which sucks for an annotation framework i think (note: minor inconvenience, still many thanks for the framework :) )

@electrum
Copy link
Member

This is a cool idea. I recommend using jline2 for the input handling: https://github.com/jline/jline2

We could even do some advanced integration with JLine's completion support.

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

2 participants