nushell/crates/nu-command/src/commands
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
..
charting Allow different names for ...rest (#3954) 2021-08-27 05:58:53 +12:00
config Begin directory contrib docs and split commands (#3650) 2021-06-19 12:06:44 +12:00
conversions Add subcommand into filesize (#3987) 2021-09-02 18:19:54 -05:00
core_commands nu-path crate refactor (#3730) 2021-08-28 15:59:09 +03:00
dataframe Allow different names for ...rest (#3954) 2021-08-27 05:58:53 +12:00
env nu-path crate refactor (#3730) 2021-08-28 15:59:09 +03:00
filesystem nu-path crate refactor (#3730) 2021-08-28 15:59:09 +03:00
filters Allow different names for ...rest (#3954) 2021-08-27 05:58:53 +12:00
formats Reimplement parsers with nu-serde (#3880) 2021-08-06 11:46:19 -05:00
generators Allow different names for ...rest (#3954) 2021-08-27 05:58:53 +12:00
math Begin directory contrib docs and split commands (#3650) 2021-06-19 12:06:44 +12:00
network Move sys, ps, fetch, post to internal commands (#3983) 2021-09-01 14:29:09 +12:00
path nu-path crate refactor (#3730) 2021-08-28 15:59:09 +03:00
pathvar Support other variables than PATH in pathvar (2nd attempt) (#3828) 2021-07-24 11:44:36 -05:00
platform nu-path crate refactor (#3730) 2021-08-28 15:59:09 +03:00
random Bump rand version used by nu-command to 0.8 (#3723) 2021-07-05 16:12:44 +12:00
shells Begin directory contrib docs and split commands (#3650) 2021-06-19 12:06:44 +12:00
strings Update char_.rs (#3975) 2021-08-29 08:40:28 -05:00
system Move sys, ps, fetch, post to internal commands (#3983) 2021-09-01 14:29:09 +12:00
viewers All is a DataFrame (#3812) 2021-07-25 22:01:54 +12:00
mod.rs Move sys, ps, fetch, post to internal commands (#3983) 2021-09-01 14:29:09 +12:00