mirror of
https://github.com/nushell/nushell
synced 2024-12-27 05:23:11 +00:00
1ba2269aa9
# Description This PR fixes #9556. Now, only a section will be added if it contains a key, value pair. With this change, `{record with 0 fields}`, should not appear anymore. For more context on empty sections, see issue on the [crate](https://github.com/zonyitoo/rust-ini/issues/109) ``` open -r whatever | from ini ╭─────────────┬──────────────────────────────────────────────────────────────╮ │ │ ╭───────────────────────┬──────────────────────────────────╮ │ │ placeholder │ │ aws_access_key_id │ AAAAAAAAAAAAAAAAAAAAA │ │ │ │ │ aws_secret_access_key │ BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB │ │ │ │ ╰───────────────────────┴──────────────────────────────────╯ │ │ │ ╭───────────────────────┬──────────────────────────╮ │ │ default │ │ aws_access_key_id │ AAAAAAAAAAAAAAAAAA │ │ │ │ │ aws_secret_access_key │ AAAAAAAAAAAAAAAAAAAAAAA │ │ │ │ │ aws_session_token │ BBBBBBBBBBBBBBBBBBBBBBBB │ │ │ │ │ region │ us-east-1 │ │ │ │ │ output │ json │ │ │ │ ╰───────────────────────┴──────────────────────────╯ │ ╰─────────────┴──────────────────────────────────────────────────────────────╯ ``` # Tests + Formatting Now test for exact `from ini` output --------- Co-authored-by: sholderbach <sholderbach@users.noreply.github.com> |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
README.md |
nu_plugin_formats
A nushell plugin to convert data to nushell tables.
support commands:
- from eml - original ported from nushell core.
- from ics - original ported from nushell core.
- from ini - original ported from nushell core.
- from vcf - original ported from nushell core.
Prerequisite
nushell
, It's a nushell plugin, so you need it.
Usage
- compile the binary:
cargo build
- register plugin(assume it's compiled in ./target/debug/):
register ./target/debug/nu_plugin_formats