mirror of
https://github.com/nushell/nushell.git
synced 2025-04-10 14:08:40 +02:00
# Description Presently, when custom values are displayed in a table, the entire object is stringified. e.g., a custom value that encodes a DNS message gets displayed as: ``` ❯ : dns query --timeout 30sec dead10ck.dev ╭───┬─────────────────────────────────────────────────────────────────────╮ │ 0 │ {header: {id: 58404, message_type: RESPONSE, op_code: QUERY, │ │ │ authoritative: false, truncated: false, recursion_desired: true, │ │ │ recursion_available: true, authentic_data: true, response_code: No │ │ │ Error, query_count: 1, answer_count: 2, name_server_count: 0, │ │ │ additional_count: 1}, question: {name: dead10ck.dev., type: AAAA, │ │ │ class: IN}, answer: [{name: dead10ck.dev., type: AAAA, class: IN, │ │ │ ttl: 1hr, rdata: 2600:1f18:6af3:9f05:f526:3a1a:611:6b22, proof: │ │ │ indeterminate}, {name: dead10ck.dev., type: RRSIG, class: IN, ttl: │ │ │ 1hr, rdata: AAAA ECDSAP256SHA256 2 3600 1736139412 1736128612 54894 │ │ │ dead10ck.dev. HIkACE70hxznmFTJhOZSmm42KpLC6a+qHchszMyhYjqtG6eP6bzc │ │ │ +XYYjC+UKMaf56SlwBwnpF1tetmrDwyUHw==, proof: indeterminate}], │ │ │ authority: [], additional: [], edns: {rcode_high: 0, version: 0, │ │ │ flags: {dnssec_ok: true}, max_payload: 1.2 KiB, opts: {}}, size: │ │ │ 177 B} │ ``` With this change, expansion to a native nushell value happens earlier so that they get displayed as any other value does. ``` ❯ : ./target/debug/nu -c 'dns query --timeout 30sec dead10ck.dev | table -- expand' ╭───┬────────────────────────────────────┬──────────────────────────┬─────╮ │ # │ header │ question │ ... │ ├───┼────────────────────────────────────┼──────────────────────────┼─────┤ │ 0 │ ╭─────────────────────┬──────────╮ │ ╭───────┬──────────────╮ │ ... │ │ │ │ id │ 37707 │ │ │ name │ dead10ck.dev │ │ │ │ │ │ message_type │ RESPONSE │ │ │ │ . │ │ │ │ │ │ op_code │ QUERY │ │ │ type │ AAAA │ │ │ │ │ │ authoritative │ false │ │ │ class │ IN │ │ │ │ │ │ truncated │ false │ │ ╰───────┴──────────────╯ │ │ │ │ │ recursion_desired │ true │ │ │ │ │ │ │ recursion_available │ true │ │ │ │ │ │ │ authentic_data │ true │ │ │ │ │ │ │ response_code │ No Error │ │ │ │ │ │ │ query_count │ 1 │ │ │ │ │ │ │ answer_count │ 2 │ │ │ │ │ │ │ name_server_count │ 0 │ │ │ │ │ │ │ additional_count │ 1 │ │ │ │ │ │ ╰─────────────────────┴──────────╯ │ │ │ ``` # User-Facing Changes Custom values are displayed as their native Nushell value. # Tests + Formatting Manual |
||
---|---|---|
.. | ||
nu_plugin_custom_values | ||
nu_plugin_example | ||
nu_plugin_formats | ||
nu_plugin_gstat | ||
nu_plugin_inc | ||
nu_plugin_nu_example | ||
nu_plugin_polars | ||
nu_plugin_python | ||
nu_plugin_query | ||
nu_plugin_stress_internals | ||
nu-cli | ||
nu-cmd-base | ||
nu-cmd-extra | ||
nu-cmd-lang | ||
nu-cmd-plugin | ||
nu-color-config | ||
nu-command | ||
nu-derive-value | ||
nu-engine | ||
nu-explore | ||
nu-glob | ||
nu-json | ||
nu-lsp | ||
nu-parser | ||
nu-path | ||
nu-plugin | ||
nu-plugin-core | ||
nu-plugin-engine | ||
nu-plugin-protocol | ||
nu-plugin-test-support | ||
nu-pretty-hex | ||
nu-protocol | ||
nu-std | ||
nu-system | ||
nu-table | ||
nu-term-grid | ||
nu-test-support | ||
nu-utils | ||
nuon | ||
README.md |
Nushell core libraries and plugins
These sub-crates form both the foundation for Nu and a set of plugins which extend Nu with additional functionality.
Foundational libraries are split into two kinds of crates:
- Core crates - those crates that work together to build the Nushell language engine
- Support crates - a set of crates that support the engine with additional features like JSON support, ANSI support, and more.
Plugins are likewise also split into two types:
- Core plugins - plugins that provide part of the default experience of Nu, including access to the system properties, processes, and web-connectivity features.
- Extra plugins - these plugins run a wide range of different capabilities like working with different file types, charting, viewing binary data, and more.