Feature Request: Influx CLI
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.
As a workaround in the meantime you can scan the history file itself at ~/.influx_history
@beckettsean Thanks for the note.
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.
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?
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.
@otoolep on it :+1:
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.