Nushell
Get Nu!
Getting Started
  • The Nushell Book
  • Command Reference
  • Cookbook
  • Language Reference Guide
  • Contributing Guide
Blog
  • English
  • 中文
  • Deutsch
  • Français
  • Español
  • 日本語
  • Português do Brasil
  • Русский язык
GitHub
Get Nu!
Getting Started
  • The Nushell Book
  • Command Reference
  • Cookbook
  • Language Reference Guide
  • Contributing Guide
Blog
  • English
  • 中文
  • Deutsch
  • Français
  • Español
  • 日本語
  • Português do Brasil
  • Русский язык
GitHub
  • Language Reference Guide
    • Readme
    • Types in the Nu Language
      • Basic Types
        • Any
        • Boolean
        • Integer
        • Float
        • Filesize
        • Duration
        • Datetime
        • Range
        • String
        • Record
        • List
        • Table
        • Closure
        • Nothing
        • Binary
        • Glob
        • Cell-Path
      • Other Data Types

        • Types that cannot be used to declare variables
          • Path
        • Types which are not declarable
          • Error
          • CustomValue
          • Block
      • Type signatures
      • Commands that interact with types
    • Operators
    • Flow control
      • if/else
      • loop
      • while
      • match
      • try/catch
      • break
      • return
      • continue
    • Filters
      • each and par-each
      • Filters to select subsets of data
      • where and filter
      • Understanding the difference between get and select
    • Custom Commands
    • Declarations
    • Variable Scope
    • Strings and Text Formatting
    • Helpers and debugging commands
    • Pipelines
    • MIME Types for Nushell

CustomValue

Description:An opaque data type that is only used internally in Nushell by built-in commands or plugins.
Annotation:None
Literal syntax:None
Casts:None

Additional Language Notes

  1. Custom values are those that might be created by Nushell internal commands or plugins. For instance, a plugin might generate a custom value that encodes data in a binary format or some other data type like structured data used by the Polars plugin or SQLite.

    Example - SQLite:

    [[a b]; [c d] [e f]] | into sqlite test.db
    open test.db | describe
    # => SQLiteDatabase

    The output from describe is SQLiteDatabase, which is a CustomValue data type.

    Example - Polars Plugin (formerly DataFrame)

    Note: The nu_plugin_polars plugin is required for the following example to work - See the Polars release announcement or The Book for instructions on installing and registering.

    ls | polars into-df | describe
    # => NuDataFrameCustomValue
  2. Values used by external commands (e.g., curl) are not of the CustomValue type.

  3. You might encounter a custom value in your interaction with parts of Nushell. Depending on the specific example, you should let the command handle it as described in the help documentation for that command or plugin.

  4. There is not necessarily a string representation of any custom value.

Edit this page on GitHub
Contributors: NotTheDr01ds, fdncred
Prev
Error
Next
Block