Home Explore Blog CI



nushell

commands/docs/explain.md
3cb2cd855b01fc2f1a74991f70678487d95ad444e8d423db00000003000002f4
---
title: explain
categories: |
  debug
version: 0.104.0
debug: |
  Explain closure contents.
usage: |
  Explain closure contents.
editLink: false
contributors: false
---
<!-- This file is automatically generated. Please edit the command in https://github.com/nushell/nushell instead. -->

# `explain` for [debug](/commands/categories/debug.md)

<div class='command-title'>Explain closure contents.</div>

## Signature

```> explain {flags} (closure)```

## Parameters

 -  `closure`: The closure to run.


## Input/output types:

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

Explain a command within a closure
```nu
> explain {|| ls | sort-by name type --ignore-case | get name } | table --expand

```

Chunks
805b5748 (1st chunk of `commands/docs/explain.md`)
Title: explain command
Summary
The `explain` command is a debugging tool that allows you to inspect the contents of a closure. It takes a closure as input and provides information about its internal structure and the commands it contains. The example shows how to use `explain` to view the details of a closure that lists files, sorts them, and extracts their names.