nushell/crates/nu-command/tests/commands/mod.rs
Lily Mara d90420ac4c
Add subcommand into filesize (#3987)
* Add subcommand `into filesize`

It's currently not possible to convert a number or a string containing a number
into a filesize. The only way to create an instance of filesize type today is
with a literal in nushell syntax. This commit adds the `into filesize`
subcommand so that file sizes can be created from the outputs of programs
producing numbers or strings, like standard unix tools.

There is a limitation with this - it doesn't currently parse values like `10 MB`
or `10 MiB`, it can only look at the number itself. If the desire is there, more
flexible parsing can be added.

* fixup! Add subcommand `into filesize`

* fixup! Add subcommand `into filesize`
2021-09-02 18:19:54 -05:00

70 lines
787 B
Rust

mod all;
mod any;
mod append;
mod cal;
mod cd;
mod compact;
mod config;
mod cp;
mod def;
mod default;
mod drop;
mod each;
mod echo;
mod empty;
mod enter;
mod every;
mod find;
mod first;
mod flatten;
mod format;
mod get;
mod group_by;
mod hash_;
mod headers;
mod help;
mod histogram;
mod insert;
mod into_filesize;
mod into_int;
mod keep;
mod last;
mod length;
mod lines;
mod ls;
mod math;
mod merge;
mod mkdir;
mod move_;
mod open;
mod parse;
mod path;
mod pathvar;
mod prepend;
mod random;
mod range;
mod reduce;
mod rename;
mod reverse;
mod rm;
mod roll;
mod rotate;
mod save;
mod select;
mod semicolon;
mod skip;
mod sort_by;
mod source;
mod split_by;
mod split_column;
mod split_row;
mod str_;
mod touch;
mod uniq;
mod update;
mod where_;
mod which;
mod with_env;
mod wrap;
mod zip;