RE: [PATCH v2] mmc-utils: Add bash completion

Avri Altman <[email protected]> Wed, 12 Aug 2026 07:05:03 +0000
Newsgroups org.kernel.vger.linux-mmc
Message-ID <LV8PR16MB6757BF9C17DC21C4304F64C1E5DC2@LV8PR16MB6757.namprd16.prod.outlook.com>
> Add a bash completion script in completion/mmc that completes
> subcommands and /dev/mmcblkN device paths for all mmc commands.
> 
> Subcommand completion is driven by parsing 'mmc help' output rather than
> maintaining a parallel hardcoded verb list, so it stays in sync as commands are
> added or removed.
> 
> The completion directory is named 'completion/' rather than 'bash-
> completion/' so shell-specific scripts for other shells (zsh, fish, etc.) can be
> placed alongside it without renaming.
> 
> Add bashcompletiondir variable to the Makefile (defaulting to the standard
> /usr/share/bash-completion/completions) and install the script as part of
> 'make install'. The install path can be overridden at build time with make
> bashcompletiondir=<path>.
> 
> Signed-off-by: Torstein Eide <[email protected]>
Reviewed-by: Avri Altman <[email protected]>