> For the complete documentation index, see [llms.txt](https://documentation.hak5.org/wifi-pineapple-pager/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.hak5.org/wifi-pineapple-pager/list_picker.md).

# LIST\_PICKER

`LIST_PICKER` Prompt the user to interactively select from a list

### When to use it <a href="#when-to-use-it" id="when-to-use-it"></a>

Use `LIST_PICKER` to prompt the user to perform different actions inside your payload, such as installing, configuring, or running. You can also use `LIST_PICKER` to present multiple options as results from a scan or other interactive choices.

`LIST_PICKER` was added to the Pineapple Pager in firmware version `1.0.8`. It will not be available on earlier firmware releases.

#### Syntax <a href="#syntax" id="syntax"></a>

```none
LIST_PICKER [title] [option] [default]
```

**title&#x20;*****required***

Prompt / dialog title. Titles should be kept short enough to fit on the device display.

**option&#x20;*****required***

One or more options. Each option is shown as a separate list item. Options should always be protected by quotes.

**default&#x20;*****required***

Default / preselected option.

{% hint style="warning" %}
A default option must always be provided!
{% endhint %}

<figure><img src="/files/3Xze6UX7LGnVB3pWTxPc" alt="A list picker dialog"><figcaption><p>A list picker dialog</p></figcaption></figure>

### Results <a href="#results" id="results"></a>

`LIST_PICKER` will wait until the user has made a selection, pausing the payload.

`LIST_PICKER` exits with a return code of `0` if the user continues, and non-zero if the user cancels.

`LIST_PICKER` returns the selected option text as the output

### Examples <a href="#examples" id="examples"></a>

```bash
__option=$(LIST_PICKER "FooPayload" "Install" "Configure" "Run" "Exit" "Run") || exit 0
case "${__option}" in
  "Install")
     # do install stuff
     ;;
  "Configure")
     # do configure stuff
     ;;
  "Run")
     # do run stuff
     ;;
  *)
     exit 0
esac
```

{% hint style="info" %}
Remember to enclose the prompt text in quotes if it contains spaces!
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://documentation.hak5.org/wifi-pineapple-pager/list_picker.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
