mendelt / cmdr

Cmdr is a library for building line-oriented text-based user interfaces in Rust.
Apache License 2.0
15 stars 1 forks source link

Allow a user to change the command in before_command hook #26

Closed mendelt closed 5 years ago

mendelt commented 5 years ago

The before command hook should take ownership of the Line and return a Line so library-users can access and change parsed lines. To do this in a way that does not burden the lib-user with the lifetime of the Line we need to get rid of these lifetimes. Probably by copying the parsed string in the Line instead of referencing slices.