nushell / reedline

A feature-rich line editor - powering Nushell
https://docs.rs/reedline/
MIT License
519 stars 144 forks source link

How to custom reedline history input msg #315

Open baoyachi opened 2 years ago

baoyachi commented 2 years ago

I need to know the history input and when. Can this be customized ? E.g:

~ history
2022-02-07 15:06:03.26 [ls]
2022-02-07 15:06:03.27 [pwd]
2022-02-07 15:06:03.30 [ls -al |grep 'hello']
...
~
fdncred commented 2 years ago

a datetime stamp isn't currently stored in the history, so that would take some design and a pr i think. a datetime stamp will definitely be there if we ever get around to implementing the sqlite version of history.

baoyachi commented 2 years ago

I see now reedline record in file. https://github.com/nushell/reedline#integrate-with-custom-history

baoyachi commented 2 years ago

May be can solve the problem of custom display first. Then next solve about how to storage.