Linux-KBuild Archive mirror
 help / color / mirror / Atom feed
From: Markus Schneider-Pargmann <msp@baylibre.com>
To: Masahiro Yamada <masahiroy@kernel.org>,
	Markus Schneider-Pargmann <msp@baylibre.com>
Cc: linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org
Subject: [RFC 0/2] kconfig: Add fzf fuzzy search for config options
Date: Wed, 27 Mar 2024 15:25:42 +0100	[thread overview]
Message-ID: <20240327142544.1728286-1-msp@baylibre.com> (raw)

Hi,

These two patches are introducing a way to use fzf with the kernel
config options.

Using 'make fzfconfig' opens a list of all config options and their
state in the currently used configuration file. A preview is provided
for the currently selected config option in the list, showing the
original Kconfig snippet. Using Enter opens make menuconfig for the
selected option.

I reused the existing helpnewconfig command as it contains all the
information necessary and extended it to display all options using
helpallconfig. Using a wrapper script, that does simple parsing, the
view is transformed into a line based representation that is usable by
fzf.

I used this helper for some time now and it seems to work quite good for
me, though there may be cornercases for symbols etc. where it doesn't
work. I chose to use helpnewconfig/helpallconfig as it seems to be just
a small modification on the existing codebase to achieve fzf support.

Best
Markus

Markus Schneider-Pargmann (2):
  kconfig: Add helpallconfig
  scripts: Add fzfconfig helper script

 scripts/fzfconfig        | 112 +++++++++++++++++++++++++++++++++++++++
 scripts/kconfig/Makefile |   8 ++-
 scripts/kconfig/conf.c   |  17 ++++--
 3 files changed, 132 insertions(+), 5 deletions(-)
 create mode 100755 scripts/fzfconfig

-- 
2.43.0


             reply	other threads:[~2024-03-27 14:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-27 14:25 Markus Schneider-Pargmann [this message]
2024-03-27 14:25 ` [RFC 1/2] kconfig: Add helpallconfig Markus Schneider-Pargmann
2024-03-27 14:25 ` [RFC 2/2] scripts: Add fzfconfig helper script Markus Schneider-Pargmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240327142544.1728286-1-msp@baylibre.com \
    --to=msp@baylibre.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).