loki-shell icon indicating copy to clipboard operation
loki-shell copied to clipboard

Import previous shell commands

Open diegombeltran opened this issue 5 years ago • 3 comments

It works flawlessly! Any chance to import previous commands into Loki?

diegombeltran avatar Oct 05 '20 09:10 diegombeltran

Good question! yes there are probably a few ways to do this.

https://github.com/slim-bean/loki-shell/blob/a34d36540b42051bd8b7e5ec80bd5c501ef7135c/shell/loki-shell.zsh#L24-L30

I think you could modify the command used to send the files with promtail to dump the entire history and not just the last entry.

I haven't tested this myself, you may want to find a way to test this on a separate Loki, or maybe an ephemeral loki docker container with out any persistent storage just to make sure it does what you want (since we can't really delete from Loki yet, but this is coming in the future)

slim-bean avatar Oct 14 '20 00:10 slim-bean

I think a solution to this (if timestamps can be brought across) would go a long way towards #10 .

Jab2870 avatar Oct 14 '20 13:10 Jab2870