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

Feature Request: Influx CLI #4628

Closed
srikara opened this issue Oct 30, 2015 · 7 comments
Closed

Feature Request: Influx CLI #4628

srikara opened this issue Oct 30, 2015 · 7 comments

Comments

@srikara
Copy link

srikara commented Oct 30, 2015

The influx cli keeps a history of recent commands that were executed which can be accessed using the 'up' arrow key. This is an extremely useful feature on the CLI.
It would be nice to have a CLI specific command that behaves like bash shell's 'history' command.
The output of the command could be a dump of recent commands on the console.

@beckettsean
Copy link
Contributor

As a workaround in the meantime you can scan the history file itself at ~/.influx_history

@srikara
Copy link
Author

srikara commented Oct 30, 2015

@beckettsean Thanks for the note.

@otoolep
Copy link
Contributor

otoolep commented Nov 4, 2015

Adding support for the command history to the CLI would not be difficult. Simply look into how the existing code reads the commands at the CLI (help for example) and if history is entered, dump the contents of the history file.

@pires
Copy link
Contributor

pires commented Nov 6, 2015

It seems the library used for writing the history file doesn't expose a method to read the history stored in-memory. So the question is whether to fork it and try a PR or implement our own history management.

Hints?

@otoolep
Copy link
Contributor

otoolep commented Nov 6, 2015

Would it be that difficult to implement our own? It doesn't seem that difficult -- it's just a file with commands in there.

We tend to avoid 3rd party libraries if we can help it, so using our own would align better.

@pires
Copy link
Contributor

pires commented Nov 6, 2015

@otoolep on it 👍

@pires
Copy link
Contributor

pires commented Nov 7, 2015

Unfortunately, liner is used all over the place so moving from it would become more than just implementing history support.
That said, I'll keep it simple.

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

No branches or pull requests

5 participants