Home Explore Blog CI



nushell

commands/docs/ansi_strip.md
dc106ebfcf8385a90c760ce20f3d2c4fdeef4f757ae1444e00000003000003dd
---
title: ansi strip
categories: |
  platform
version: 0.104.0
platform: |
  Strip ANSI escape sequences from a string.
usage: |
  Strip ANSI escape sequences from a string.
editLink: false
contributors: false
---
<!-- This file is automatically generated. Please edit the command in https://github.com/nushell/nushell instead. -->

# `ansi strip` for [platform](/commands/categories/platform.md)

<div class='command-title'>Strip ANSI escape sequences from a string.</div>

## 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       |
| ------------ | ------------ |
| list\<string\> | list\<string\> |
| record       | record       |
| string       | string       |
| table        | table        |
## Examples

Strip ANSI escape sequences from a string
```nu
> $'(ansi green)(ansi cursor_on)hello' | ansi strip
hello
```

Chunks
7d7e254c (1st chunk of `commands/docs/ansi_strip.md`)
Title: ansi strip: Strip ANSI Escape Sequences
Summary
The `ansi strip` command removes ANSI escape sequences from a string or data structure. It accepts a string, list of strings, record, or table as input and returns the same data structure with ANSI sequences removed from the strings within.