Skip to content

Strip CONFIG_ prefix in jump-to search dialog#42

Merged
jserv merged 1 commit intomainfrom
strip-config-prefix
Feb 20, 2026
Merged

Strip CONFIG_ prefix in jump-to search dialog#42
jserv merged 1 commit intomainfrom
strip-config-prefix

Conversation

@jserv
Copy link
Contributor

@jserv jserv commented Feb 20, 2026

Users frequently copy symbol names with the CONFIG_ prefix from grep output, source code, or documentation. Both menuconfig and guiconfig compare search input against symbol names that lack the prefix, so these searches silently returned no results.

This strips leading "config_" (after lowercasing) from each search token before regex compilation, using startswith() + slicing consistent with the existing codebase style. This is a no-op for tokens that don't carry the prefix, preserving full backward compatibility.


Summary by cubic

Jump-to search now accepts config-prefixed symbols in both menuconfig and guiconfig. Pasted names like CONFIG_FOO or BR2_FOO will match FOO.

  • Bug Fixes
    • Strip the leading config prefix from each token using Kconfig.config_prefix (case-insensitive); no-op if absent.
    • Supports multiple tokens and preserves regex behavior; invalid patterns still raise errors.
    • Added tests for prefix stripping, case handling, multi-token queries, custom prefixes, and bad regex cases.

Written for commit 7e249c5. Summary will update on new commits.

cubic-dev-ai[bot]

This comment was marked as resolved.

Users frequently copy symbol names with the CONFIG_ prefix from grep
output, source code, or documentation.  Both menuconfig and guiconfig
compare search input against symbol names that lack the prefix, so
these searches silently returned no results.

This strips leading config prefix (after lowercasing) from each search
token before regex compilation, using Kconfig.config_prefix rather
than a hardcoded "CONFIG_" string.  This respects custom prefixes
set via the CONFIG_ environment variable (e.g. "BR2_" for Buildroot).
The stripping uses startswith() + slicing, consistent with the
existing codebase style.
@jserv jserv force-pushed the strip-config-prefix branch from 342e12e to 7e249c5 Compare February 20, 2026 12:05
@jserv jserv merged commit d665282 into main Feb 20, 2026
9 checks passed
@jserv jserv deleted the strip-config-prefix branch February 20, 2026 12:36
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