commit 021058b tried to extend completion such that usermod -G root,systemd-<TAB> suggests possible completions for systemd-.
It works when only a single candidate is available (e.g. root,systemd-core<TAB> -> root,systemd-coredump), but when multiple completions are available, the prefix (root,) is dropped (e.g. root,systemd-<TAB> -> systemd- with initially no further suggestions).
This problem was first noticed when using the tshark -O http,t<TAB> option.
Reproducer (change XDG_DATA_DIRS to avoid loading completions from default path):
$ bash --rcfile <(echo 'XDG_DATA_DIRS=/nonexistent; . ./bash_completion')
$ usermod -G root,systemd-<TAB>
Environment:
- Distribution: Arch Linux
- bash 4.4.023-1
- bash-completion 2.8-1 and git master 2.1-871-gc9c14da4