#1095030 grub-common: Grub bash completion fails with error '-bash: _split_longopt: command not found'

Package:
grub-common
Source:
grub-common
Description:
GRand Unified Bootloader (common files)
Submitter:
Juozas Pocius
Date:
2025-02-02 19:18:02 UTC
Severity:
normal
#1095030#5
Date:
2025-02-02 19:16:04 UTC
From:
To:
Dear Maintainer,

Bash tab completion for grub is broken on latest Debian unstable build,
it is broken when using bash-completion 1:2.16.0-7. Trying to
autocomplete any grub command in the shell ends with failure where bash
throws an error '-bash: _split_longopt: command not found'
An example would be completing grub-install command, it would throw an
error when trying to complete for command line arguments.

The affected script, provided by grub-common contains _split_longopt
while package in bash-completion has _comp__split_longopt.
As the function name in recent bash-completion is updated, the function name in
the scripts should also be updated.

Running from minimal Debian unstable chroot installed on a filesystem
mounted on partitioned loop device created by using a losetup tool on
the host Ubuntu Linux system. All required packages to make the disk image
bootable are installed in the mounted chroot.