Skip to content

Commit 87c1956

Browse files
committed
docs: update docs for named source commands
1 parent 464a9c7 commit 87c1956

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

docs/reference/03-channel-spec.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ Defines what data the channel searches through.
5656
| Field | Type | Required | Description |
5757
|-------|------|----------|-------------|
5858
| `command` | string or string[] | Yes | Command(s) that produce entries |
59+
| `command_name` | string or string[] | No | Display name(s) for source commands, shown in the results panel header when cycling |
5960
| `ansi` | boolean | No | Parse ANSI escape codes (default: false) |
6061
| `display` | string | No | Template for display (incompatible with `ansi = true`) |
6162
| `output` | string | No | Template for final output |
@@ -79,6 +80,18 @@ command = ["fd -t f", "fd -t f -H", "fd -t f -H -I"]
7980
# Press Ctrl+S to cycle between commands
8081
```
8182

83+
### Named Source Commands
84+
85+
When using multiple source commands, you can give each one a display name.
86+
The name replaces the generic "Results" label in the results panel header,
87+
making it easy to see which source is active.
88+
89+
```toml
90+
[source]
91+
command = ["fd -t f", "fd -t f -H", "fd -t f -H -I"]
92+
command_name = ["Default", "Hidden", "All"]
93+
```
94+
8295
### With ANSI Colors
8396

8497
```toml
@@ -354,6 +367,7 @@ requirements = ["docker"]
354367
[source]
355368
command = ["docker ps --format '{{.ID}}\\t{{.Names}}\\t{{.Status}}'",
356369
"docker ps -a --format '{{.ID}}\\t{{.Names}}\\t{{.Status}}'"]
370+
command_name = ["Running", "All"]
357371
display = "{split:\\t:1} | {split:\\t:2}"
358372
output = "{split:\\t:0}"
359373

0 commit comments

Comments
 (0)