Spec-Zone.ru › Nushell

ansi strip for platform

Strip ANSI escape sequences from a string.

Signature

> ansi strip {flags} ...rest

Parameters

  • ...rest: For a data structure input, remove ANSI sequences from strings at the given cell paths.

Input/output types:

input output
string string
list<string> list<string>
table table
record record

Examples

Strip ANSI escape sequences from a string

> $'(ansi green)(ansi cursor_on)hello' | ansi strip
hello

Strip ANSI escape sequences from a record field

> { greeting: $'hello (ansi red)world' exclamation: false } | ansi strip greeting
╭─────────────┬─────────────╮
│ greeting    │ hello world │
│ exclamation │ false       │
╰─────────────┴─────────────╯

Strip ANSI escape sequences from multiple table columns

> [[language feature]; [$'(ansi red)rust' $'(ansi i)safety']] | ansi strip language feature
╭───┬──────────┬─────────╮
│ # │ language │ feature │
├───┼──────────┼─────────┤
│ 0 │ rust     │ safety  │
╰───┴──────────┴─────────╯

Copyright © 2019–2026 The Nushell Project DevelopersLicensed under the MIT License.
https://www.nushell.sh/commands/docs/ansi_strip.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API