mirror of
https://github.com/nushell/nushell.git
synced 2024-11-25 09:53:43 +01:00
eb3c2c9e76
This commit applied adds comments preceding a command to the LiteCommands new field `comments`. This can be usefull for example when defining a function with `def`. Nushell could pick up the comments and display them when the user types `help my_def_func`. Example ```shell def my_echo [arg] { echo $arg } ``` The LiteCommand def will now contain the comments `My echo` and `It's much better :)`. The comment is not associated with the next command if there is a (or multiple) newline between them. Example ```shell echo 42 ``` This new functionality is similar to DocStrings. One might introduce a special notation for such DocStrings, so that the parser can differentiate better between discardable comments and usefull documentation.
61 lines
703 B
Rust
61 lines
703 B
Rust
mod append;
|
|
mod autoenv;
|
|
mod autoenv_trust;
|
|
mod autoenv_untrust;
|
|
mod cal;
|
|
mod cd;
|
|
mod compact;
|
|
mod count;
|
|
mod cp;
|
|
mod def;
|
|
mod default;
|
|
mod drop;
|
|
mod each;
|
|
mod echo;
|
|
mod empty;
|
|
mod enter;
|
|
mod every;
|
|
mod first;
|
|
mod flatten;
|
|
mod format;
|
|
mod get;
|
|
mod group_by;
|
|
mod hash_;
|
|
mod headers;
|
|
mod histogram;
|
|
mod insert;
|
|
mod into_int;
|
|
mod keep;
|
|
mod last;
|
|
mod lines;
|
|
mod ls;
|
|
mod math;
|
|
mod merge;
|
|
mod mkdir;
|
|
mod move_;
|
|
mod open;
|
|
mod parse;
|
|
mod path;
|
|
mod prepend;
|
|
mod random;
|
|
mod range;
|
|
mod reduce;
|
|
mod rename;
|
|
mod reverse;
|
|
mod rm;
|
|
mod save;
|
|
mod select;
|
|
mod semicolon;
|
|
mod skip;
|
|
mod sort_by;
|
|
mod split_by;
|
|
mod split_column;
|
|
mod split_row;
|
|
mod str_;
|
|
mod touch;
|
|
mod uniq;
|
|
mod update;
|
|
mod where_;
|
|
mod with_env;
|
|
mod wrap;
|