Skip to content

feat(search-page): extend search to command arguments and property values, display more choices, and allow list wrapping#13

Open
TheJYU wants to merge 4 commits intoCogentRedTester:masterfrom
TheJYU:dev
Open

feat(search-page): extend search to command arguments and property values, display more choices, and allow list wrapping#13
TheJYU wants to merge 4 commits intoCogentRedTester:masterfrom
TheJYU:dev

Conversation

@TheJYU
Copy link
Copy Markdown

@TheJYU TheJYU commented Mar 17, 2026

This PR consists of several new improvements.

  • The search matches command arguments and their types, as well as property values.
  • Display choices for more options, including options of type "Object settings list" (e.g. vo, ao, vf, af).
  • Allow list wrapping in search results (set wrap=yes in search-page.conf to enable).

For example, we can search for commands that take a "filename" argument,
image

or commands that take a "time" type argument,
image

or properties with a value containing "7z",
image

and the choices for "af" which were previously missing, are now displayed correctly.
image

set wrap=yes in search-page.conf to enable list wrapping in search results.
Previously, the script only searches the name of commands. This commit extends the search to also search command arguments and their types.
Previously, the script only searches the name of properties. This commit extends the search to also search property values.
Options of type "Object settings list" (e.g. vo, ao, vf, af) return a valid choices string via mp.get_property_osd("option-info/<name>/choices"), even though their type is not "Choice".
This commit updates the logic to display choices whenever the choices string is not empty, rather than only when the option type is "Choice".
`type == "Choice" or type == "Object settings list"` could also work, but I think `choices ~= ""` is more elegant and future‑proof.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant