-
Notifications
You must be signed in to change notification settings - Fork 409
iscsiadm completion: incorrect option formatting (--logoutall--show) #1611
Description
The iscsiadm bash completion incorrectly merges multiple options into a single string during tab completion.
Specifically, in node mode, the options:
--logoutall and --show
are concatenated as:
--logoutall--show
This results in incorrect and confusing auto-completion output.
To reproduce
- Install
iscsiadmand ensure bash-completion is enabled - Run:
iscsiadm --mode node -- - Observe the completion suggestions
Expected behavior
Options should be properly separated:
--logoutall --show
Actual behavior
Options are merged:
--logoutall--show
Versions (please complete the following information)
-
Operating system name/distribution and version:
Rocky Linux 9.7 (Blue Onyx) -
bash version,
echo "$BASH_VERSION":
GNU bash, version 5.1.8(1)-release (x86_64-redhat-linux-gnu) -
bash-completion version,
(IFS=.; echo "${BASH_COMPLETION_VERSINFO[*]}"):
2.11 -
iscsiadm version:
6.2.1.11
Additional context
The issue originates from the completion script:
completions-core/iscsiadm.bash
In the node case, the options string contains:
--logoutall--show
which is missing a space between two valid options.
This causes bash completion to treat it as a single invalid option instead of two separate options.
Proposed fix:
Replace:
--logoutall--show
With:
--logoutall --show
I can submit a PR with this fix if this approach is acceptable.