MrPicklePinosaur / shrs

The rusty shell toolkit for hackers
https://mrpicklepinosaur.github.io/shrs/
Apache License 2.0
301 stars 24 forks source link

[Feature]: History trait should provide method that returns iterator of history rather than a vector #463

Open MrPicklePinosaur opened 3 months ago

MrPicklePinosaur commented 3 months ago

What would you like to see added?

Currently the history trait specifies:

fn items(&self, sh: &Shell, states: &States) -> Vec<String>;

It would provide much more flexibility to have this be a (generic) iterator over strings to give the implementor of the trait more freedom on the implementation.