2022-02-14 03:22:51 +01:00
|
|
|
---
|
|
|
|
title: char
|
|
|
|
layout: command
|
2022-03-04 13:10:09 +01:00
|
|
|
version: 0.59.1
|
2022-02-14 03:22:51 +01:00
|
|
|
---
|
|
|
|
|
2021-05-30 02:57:04 +02:00
|
|
|
Output special characters (e.g., 'newline').
|
|
|
|
|
2022-02-14 03:22:51 +01:00
|
|
|
## Signature
|
|
|
|
|
|
|
|
```> char (character) ...rest --list --unicode```
|
2021-05-30 02:57:04 +02:00
|
|
|
|
|
|
|
## Parameters
|
|
|
|
|
2022-02-14 03:22:51 +01: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 02:57:04 +02:00
|
|
|
|
|
|
|
## Examples
|
2022-02-14 03:22:51 +01:00
|
|
|
|
|
|
|
Output newline
|
2021-05-30 02:57:04 +02:00
|
|
|
```shell
|
|
|
|
> char newline
|
2022-02-14 03:22:51 +01:00
|
|
|
```
|
2021-05-30 02:57:04 +02:00
|
|
|
|
2022-02-14 03:22:51 +01:00
|
|
|
Output prompt character, newline and a hamburger character
|
2021-05-30 02:57:04 +02:00
|
|
|
```shell
|
2022-02-14 03:22:51 +01:00
|
|
|
> echo [(char prompt) (char newline) (char hamburger)] | str collect
|
|
|
|
```
|
2021-05-30 02:57:04 +02:00
|
|
|
|
2022-02-14 03:22:51 +01:00
|
|
|
Output Unicode character
|
2021-05-30 02:57:04 +02:00
|
|
|
```shell
|
|
|
|
> char -u 1f378
|
2022-02-14 03:22:51 +01:00
|
|
|
```
|
2021-05-30 02:57:04 +02:00
|
|
|
|
2022-02-14 03:22:51 +01:00
|
|
|
Output multi-byte Unicode character
|
2021-05-30 02:57:04 +02:00
|
|
|
```shell
|
|
|
|
> char -u 1F468 200D 1F466 200D 1F466
|
2022-02-14 03:22:51 +01:00
|
|
|
```
|