Skip to content

Typo in bash-nvme-completion.sh #552

@nbarrios1337

Description

@nbarrios1337

Behavior

When using tab autocompletion for nvme get (i.e. nvme get<tab><tab>), I get the following:

get_feature    get-log    get-ns-id 

However, man nvme and nvme help list the "get feature" subcommand as get-feature.

Trying to use nvme get_feature results in the same usage dialog as nvme help, instead of the subcommand-specific:

get-feature: Invalid argument
Usage: nvme get-feature <device> [OPTIONS]

Read operating parameters of the specified controller. Operating parameters
are grouped and identified by Feature Identifiers; each Feature Identifier
contains one or more attributes that may affect behaviour of the feature.
Each Feature has three possible settings: default, saveable, and current. If
a Feature is saveable, it may be modified by set-feature. Default values are
vendor-specific and not changeable. Use set-feature to change saveable
Features.

Options:
  [  --namespace-id=<NUM>, -n <NUM> ]   --- identifier of desired namespace
  [  --feature-id=<NUM>, -f <NUM> ]     --- feature identifier
  [  --sel=<NUM>, -s <NUM> ]            --- [0-3]:
                                            current/default/saved/supported
  [  --data-len=<NUM>, -l <NUM> ]       --- buffer len if data is returned
                                            through host memory buffer
  [  --raw-binary, -b ]                 --- show infos in binary format
  [  --cdw11=<NUM>, -c <NUM> ]          --- dword 11 for interrupt vector
                                            config
  [  --human-readable, -H ]             --- show infos in readable format

Autocompleting nvme get-feature (i.e. nvme get-feature<space><tab><tab>) works as intended, showing (in my case):

-b                /dev/nvme0n1p1    --feature-id=     -l                --sel=
--cdw11=          /dev/nvme0n1p2    -h                -n                
--data-len=       /dev/nvme0n1p3    -H                --namespace-id=   
/dev/nvme0        /dev/nvme0n1p4    --help            --raw-binary      
/dev/nvme0n1      -f                --human-readable  -s   

Expected Behavior

Autocompleting nvme get should result in: get-feature get-log get-ns-id, matching the rest of nvme-cli's documentation and help dialogs.

Environment

  • OS: Pop!_OS 19.04 x86_64
  • Kernel: 5.0.0-25-generic
  • Shell: bash 5.0.3
  • nvme version 1.7

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions