# pan filter — Interactive Filter & Select

Opens an interactive popup with a text input to filter items in real time.

## Usage

```
pan filter [OPTIONS] <ITEMS...>
```

## Options

| Flag                     | Default              | Description                        |
|--------------------------|----------------------|------------------------------------|
| `-t`, `--title`          | `"Filtrar"`          | Title in the popup header          |
| `-m`, `--multi`          | (off)                | Enable multi-select with Space     |
| `-W`, `--width`          | `0` (auto)           | Popup width                        |
| `-H`, `--height`         | `0` (auto)           | Popup height                       |
| `-M`, `--max`            | (unlimited)          | Max selected items (with --multi)  |
| `--guide`                |                      | Show this guide                    |

## Exit codes

| Code | Meaning                     |
|------|-----------------------------|
| 0    | Selection made              |
| 1    | Cancelled / no selection    |

## Examples

```bash
# Filter and select a single item
pan filter "apple" "banana" "cherry" "date"

# Multi-select with filter
pan filter -m "red" "green" "blue" "yellow"

# Custom title
pan filter -t "Choose files" file1.txt file2.txt file3.txt
```

## Keys

| Key              | Action                        |
|------------------|-------------------------------|
| Any char         | Add to filter                 |
| Backspace        | Delete char before cursor     |
| Left / Right     | Move filter cursor            |
| Home / End       | Filter cursor start / end     |
| Up / Down        | Navigate items                |
| Tab              | Navigate down                 |
| Shift+Tab        | Navigate up                   |
| Enter            | Confirm selection             |
| Esc              | Cancel                        |
| Space (multi)    | Toggle item                   |
| Ctrl + c         | Emergency exit                |

## Mouse

- **Click item**: select (single) or toggle (multi)
- **Drag**: move popup by border or title bar
