Skip to content
This repository was archived by the owner on Jan 23, 2026. It is now read-only.

Commit ec806a0

Browse files
authored
Merge pull request #753 from evakhoni/multi_selector
opt_selector enabled multiple labels
2 parents 1c66560 + c8841df commit ec806a0

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

  • packages/jumpstarter-cli/jumpstarter_cli

packages/jumpstarter-cli/jumpstarter_cli/common.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,18 @@
55
from pydantic import TypeAdapter, ValidationError
66
from pytimeparse2 import parse as parse_duration
77

8+
9+
def _opt_selector_callback(_ctx, _param, value):
10+
"""Combine multiple selector values into a single comma-separated string."""
11+
return ",".join(value) if value else None
12+
813
opt_selector = click.option(
914
"-l",
1015
"--selector",
16+
multiple=True,
17+
callback=_opt_selector_callback,
1118
help="Selector (label query) to filter on, supports '=', '==', and '!=' (e.g. -l key1=value1,key2=value2)."
12-
" Matching objects must satisfy all of the specified label constraints.",
19+
" Matching objects must satisfy all of the specified label constraints. Can be specified multiple times.",
1320
)
1421

1522

0 commit comments

Comments
 (0)