Add examples to commands (#1752)

* Pass &dyn WholeStreamCommand to get_help

* Add an optional example to the WholeStreamCommand trait

* Add an example to the alias command
This commit is contained in:
Elichai Turkel
2020-05-11 23:05:44 +03:00
committed by GitHub
parent 42eb658c37
commit c3a066eeb4
6 changed files with 44 additions and 31 deletions

View File

@ -125,7 +125,9 @@ pub(crate) mod wrap;
pub(crate) use autoview::Autoview;
pub(crate) use cd::Cd;
pub(crate) use command::{whole_stream_command, Command, UnevaluatedCallInfo, WholeStreamCommand};
pub(crate) use command::{
whole_stream_command, Command, Example, UnevaluatedCallInfo, WholeStreamCommand,
};
pub(crate) use alias::Alias;
pub(crate) use append::Append;