nushell/crates/nu-command/src
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
..
classified feat: spawn the executables directly if possible (#3974) 2021-09-01 09:38:52 -05:00
commands Add subcommand into filesize (#3987) 2021-09-02 18:19:54 -05:00
examples Allow different names for ...rest (#3954) 2021-08-27 05:58:53 +12:00
utils Fix #3582 (#3583) 2021-06-09 18:07:54 +12:00
args.rs Begin directory contrib docs and split commands (#3650) 2021-06-19 12:06:44 +12:00
default_context.rs Add subcommand into filesize (#3987) 2021-09-02 18:19:54 -05:00
examples.rs Rolling and cumulative commands (#3960) 2021-08-24 09:10:29 -05:00
lib.rs Begin directory contrib docs and split commands (#3650) 2021-06-19 12:06:44 +12:00
prelude.rs Fix issue in external subexpression paths (#3642) 2021-06-18 07:59:58 +12:00
utils.rs Fix #3582 (#3583) 2021-06-09 18:07:54 +12:00