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

Question: Command History #4

Closed
wwboynton opened this issue Jul 25, 2014 · 2 comments
Closed

Question: Command History #4

wwboynton opened this issue Jul 25, 2014 · 2 comments

Comments

@wwboynton
Copy link

Is there a way to read in command history from a logfile or simply an array on startup?

@davispuh
Copy link
Owner

Kinda, but this would be useful to implement it properly. Basically CLI-Console uses HighLine for all input handling and it uses Readline for history and completion support.

So basically if you add require 'readline' before require 'highline' then you can add history to Readline::HISTORY
eg.

Readline::HISTORY << "some_command"

But this is not pretty and more like a hack, because you assume things about internal working that Readline is used. I think proper way would be to implement it in HighLine that you can change history there and then in CLI-Console would use that interface.

I don't really have time for this now, so I would really appreciate if you could contribute it to HighLine and then here :)

@wwboynton
Copy link
Author

I'm a beginning rubyist, but if I have the time and opportunity, I'll see if I could find the time and patience to read up and make a contribution to highline. In the meantime, thank you so very much for your speedy and helpful response. I've really enjoyed using CLI-Console :)

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