Skip to content

Generated Bash completion script does not complete any options #17

@schoettl

Description

@schoettl

Option completion does not work at all in Bash.

$ backend --help
usage: backend [options]

options:
  -H, --no-hardware
    Use hardware mockup instead of real hardware.
$ docopt-completion backend --manual-bash
Completion file written to ./backend.sh

Generated completion function is:

_backend()
{
    local cur
    cur="${COMP_WORDS[COMP_CWORD]}"

    if [ $COMP_CWORD -ge 1 ]; then
        COMPREPLY=( $( compgen -W ' ' -- $cur) )
    fi
}

The options are not mentioned in this script and (after sourcing it) option completion does not work.

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