Skip to content

iscsiadm completion: incorrect option formatting (--logoutall--show) #1611

@ADI2705

Description

@ADI2705

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

  1. Install iscsiadm and ensure bash-completion is enabled
  2. Run:
    iscsiadm --mode node --
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions