Home Explore Blog CI



nushell

commands/docs/char.md
63dc9c07f6951cc7d0106b98b981ea1b8d308ee01ac35c460000000300000583
---
title: char
categories: |
  strings
version: 0.104.0
strings: |
  Output special characters (e.g., 'newline').
usage: |
  Output special characters (e.g., 'newline').
editLink: false
contributors: false
---
<!-- This file is automatically generated. Please edit the command in https://github.com/nushell/nushell instead. -->

# `char` for [strings](/commands/categories/strings.md)

<div class='command-title'>Output special characters (e.g., &amp;#x27;newline&amp;#x27;).</div>

## 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:

| input   | output |
| ------- | ------ |
| nothing | any    |
## Examples

Output newline
```nu
> char newline


```

List available characters
```nu
> char --list

```

Output prompt character, newline and a hamburger menu character
```nu
> (char prompt) + (char newline) + (char hamburger)
▶
≡
```

Output Unicode character
```nu
> char --unicode 1f378
🍸
```

Create Unicode from integer codepoint values
```nu
> char --integer (0x60 + 1) (0x60 + 2)
ab
```

Output multi-byte Unicode character
```nu
> char --unicode 1F468 200D 1F466 200D 1F466
👨‍👦‍👦
```

Chunks
b1cdec80 (1st chunk of `commands/docs/char.md`)
Title: char command documentation
Summary
This document describes the `char` command in Nushell, which outputs special characters like 'newline'. It covers the command's signature, flags (list, unicode, integer), parameters (character, rest), input/output types, and provides usage examples for outputting newline characters, listing available characters, combining characters, outputting Unicode characters, creating Unicode from integer codepoint values, and outputting multi-byte Unicode characters.