Skip to content

Nested user bindings#51

Draft
adnrivera wants to merge 3 commits into
facebook:mainfrom
adnrivera:nested-user-bindings
Draft

Nested user bindings#51
adnrivera wants to merge 3 commits into
facebook:mainfrom
adnrivera:nested-user-bindings

Conversation

@adnrivera

@adnrivera adnrivera commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Implements some suggestions on this comment.

Allows the user to write nested commands, including commands with query placeholders.

Config example

[user_bindings]
work = { command = "gh facebook", description = "Work GitHub" }
gh = { command = "gh mycompany/main-repo", override = true }

[user_bindings.aoc]
url = "https://adventofcode.com"
[user_bindings.aoc.nested.r]
url = "https://www.reddit.com/r/adventofcode/"
[user_bindings.aoc.nested.j]
url = "https://github.com/jrodal98/advent-of-code"

CLI

Screenshot 2026-06-26 at 2 46 41 PM

Server

Screenshot 2026-06-26 at 2 46 17 PM

The CLI `--list` table only rendered a Nested binding's parent row, so
nested children (e.g. `cal g`) were invisible. Expand each Nested parent
into its own row plus one row per child, sorted case-insensitively by key.
Child rows display as `<parent> <child>` with a `nested` status, since they
are reachable only through the parent and not subject to built-in shadowing.

Add an integration test that asserts the parent and child rows appear.
The bindings page only rendered a Nested binding's parent card, so nested
children were missing from `bunnylol serve`. Expand each Nested parent into
its own card plus one card per child (named `<parent> <child>`, e.g. `aoc r`),
mirroring the CLI `--list` table. Add a unit test over collect_user_bindings.
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jun 24, 2026
@adnrivera adnrivera marked this pull request as draft June 30, 2026 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant