2022-02-14 02:22:51 +00:00
|
|
|
---
|
|
|
|
title: char
|
|
|
|
layout: command
|
|
|
|
version: 0.59.0
|
|
|
|
---
|
|
|
|
|
2021-05-30 00:57:04 +00:00
|
|
|
Output special characters (e.g., 'newline').
|
|
|
|
|
2022-02-14 02:22:51 +00:00
|
|
|
## Signature
|
|
|
|
|
|
|
|
```> char (character) ...rest --list --unicode```
|
2021-05-30 00:57:04 +00:00
|
|
|
|
|
|
|
## Parameters
|
|
|
|
|
2022-02-14 02:22:51 +00:00
|
|
|
- `character`: the name of the character to output
|
|
|
|
- `...rest`: multiple Unicode bytes
|
|
|
|
- `--list`: List all supported character names
|
|
|
|
- `--unicode`: Unicode string i.e. 1f378
|
2021-05-30 00:57:04 +00:00
|
|
|
|
|
|
|
## Examples
|
2022-02-14 02:22:51 +00:00
|
|
|
|
|
|
|
Output newline
|
2021-05-30 00:57:04 +00:00
|
|
|
```shell
|
|
|
|
> char newline
|
2022-02-14 02:22:51 +00:00
|
|
|
```
|
2021-05-30 00:57:04 +00:00
|
|
|
|
2022-02-14 02:22:51 +00:00
|
|
|
Output prompt character, newline and a hamburger character
|
2021-05-30 00:57:04 +00:00
|
|
|
```shell
|
2022-02-14 02:22:51 +00:00
|
|
|
> echo [(char prompt) (char newline) (char hamburger)] | str collect
|
|
|
|
```
|
2021-05-30 00:57:04 +00:00
|
|
|
|
2022-02-14 02:22:51 +00:00
|
|
|
Output Unicode character
|
2021-05-30 00:57:04 +00:00
|
|
|
```shell
|
|
|
|
> char -u 1f378
|
2022-02-14 02:22:51 +00:00
|
|
|
```
|
2021-05-30 00:57:04 +00:00
|
|
|
|
2022-02-14 02:22:51 +00:00
|
|
|
Output multi-byte Unicode character
|
2021-05-30 00:57:04 +00:00
|
|
|
```shell
|
|
|
|
> char -u 1F468 200D 1F466 200D 1F466
|
2022-02-14 02:22:51 +00:00
|
|
|
```
|