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
  • Categories

    • Bits
    • Bytes
    • Chart
    • Conversions
    • Core
    • Database
    • Dataframe
    • Dataframe Or Lazyframe
    • Date
    • Debug
    • Default
    • Env
    • Experimental
    • Expression
    • Filesystem
    • Filters
    • Formats
    • Generators
    • Hash
    • History
    • Lazyframe
    • Math
    • Misc
    • Network
    • Path
    • Platform
    • Plugin
    • Prompt
    • Random
    • Removed
    • Shells
    • Strings
    • System
    • Viewers

char for strings

Output special characters (e.g., 'newline').

Signature

> char {flags} (character) ...rest

Flags

  • --list, -l: List all supported character names
  • --unicode, -u: Unicode string i.e. 1f378
  • --integer, -i: Create a codepoint from an integer

Parameters

  • character: The name of the character to output.
  • ...rest: Multiple Unicode bytes.

Input/output types:

inputoutput
nothingany

Examples

Output newline

> char newline

List available characters

> char --list

Output prompt character, newline and a hamburger menu character

> (char prompt) + (char newline) + (char hamburger)
▶
≡

Output Unicode character

> char --unicode 1f378
🍸

Create Unicode from integer codepoint values

> char --integer (0x60 + 1) (0x60 + 2)
ab

Output multi-byte Unicode character

> char --unicode 1F468 200D 1F466 200D 1F466
👨‍👦‍👦