Home Explore Blog CI



nushell

commands/docs/input_list.md
3d78cacd3f5797aaf3ff4f117dc1b5b87eb6f79b69fd37250000000300000625
---
title: input list
categories: |
  platform
version: 0.104.0
platform: |
  Interactive list selection.
usage: |
  Interactive list selection.
editLink: false
contributors: false
---
<!-- This file is automatically generated. Please edit the command in https://github.com/nushell/nushell instead. -->

# `input list` for [platform](/commands/categories/platform.md)

<div class='command-title'>Interactive list selection.</div>

## Signature

```> input list {flags} (prompt)```

## Flags

 -  `--multi, -m`: Use multiple results, you can press a to toggle all options on/off
 -  `--fuzzy, -f`: Use a fuzzy select.
 -  `--index, -i`: Returns list indexes.
 -  `--display, -d {cell-path}`: Field to use as display value

## Parameters

 -  `prompt`: The prompt to display.


## Input/output types:

| input     | output |
| --------- | ------ |
| list\<any\> | any    |
| range     | int    |
## Examples

Return a single value from a list
```nu
> [1 2 3 4 5] | input list 'Rate it'

```

Return multiple values from a list
```nu
> [Banana Kiwi Pear Peach Strawberry] | input list --multi 'Add fruits to the basket'

```

Return a single record from a table with fuzzy search
```nu
> ls | input list --fuzzy 'Select the target'

```

Choose an item from a range
```nu
> 1..10 | input list

```

Return the index of a selected item
```nu
> [Banana Kiwi Pear Peach Strawberry] | input list --index

```

Choose an item from a table using a column as display value
```nu
> [[name price]; [Banana 12] [Kiwi 4] [Pear 7]] | input list -d name

```

## Notes
Abort with esc or q.

Chunks
184f8056 (1st chunk of `commands/docs/input_list.md`)
Title: input list
Summary
The `input list` command allows for interactive list selection. It takes a list as input and displays a prompt, allowing the user to select one or more items from the list. It supports multiple selection, fuzzy search, returning list indexes, and using a specific field as the display value. The command can be aborted with the 'esc' or 'q' key.