Open sigmaSd opened 2 years ago
Do you happen to know an alternative light weight crate for that task? In this case it is just needed for the basic timestamp in the example Prompt and now in the History with metadata (#401)
that can probably also be done with std::time::SystemTime::now().duration_since(SystemTime::UNIX_EPOCH)
(same for the use for database history in nushell itself)
For the time-stamping in the db that should be fine (if timezone or strict ordering concerns are not an issue). I don't recall the std library directly providing the formatting machinery for it to be useful in the example prompt (but yeah making a dependency for that a disable-able default feature could be an option for the dependency conscious)
Chrono is a relatively big dependency, at least making it optional would allow user to choose to remove it
cargo bloat: chrono alone is adding 1.1% to text section
here is an example implementation https://github.com/nushell/reedline/compare/main...sigmaSd:opt_chrono?expand=1
comparison with this pr