Auto-complete for grub-reboot provides invalid options, most of which fail silently

Bug #1886211 reported by Ricardo Abreu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)
New
Undecided
Unassigned

Bug Description

Hitting tab on `grub-reboot` gives:

```
$ grub-reboot [tab]
--id
Advanced options for Ubuntu
Ubuntu
Ubuntu, with Linux 4.15.0-108-generic
Ubuntu, with Linux 4.15.0-108-generic (recovery mode)
Ubuntu, with Linux 4.15.0-109-generic
Ubuntu, with Linux 4.15.0-109-generic (recovery mode)
```

But

```
$ grub-reboot --id
Unrecognized option `--id'
[...]
```

And the menu items starting with "Ubuntu, with Linux 4.15.0-" are actually in the submenu "Advanced options for Ubuntu". So, saying `grub-reboot "Ubuntu, with Linux 4.15.0-108-generic", does not have the desired effect. One needs to say instead `grub-reboot "Advanced options for Ubuntu>Ubuntu, with Linux 4.15.0-108-generic"`.

Additionally, `grub-reboot` accepts those and other meaningless parameters without complaint:

```
$ sudo grub-reboot nonsense && echo success
success
```

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: grub2-common 2.02-2ubuntu8.15
ProcVersionSignature: User Name 4.15.0-109.110-generic 4.15.18
Uname: Linux 4.15.0-109-generic x86_64
ApportVersion: 2.20.9-0ubuntu7.15
Architecture: amd64
Date: Fri Jul 3 16:35:28 2020
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=C.UTF-8
 SHELL=/bin/bash
SourcePackage: grub2
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Ricardo Abreu (ricab) wrote :
description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.