Skip to content

2.6.1: add sink --{above,below} bash-completion? #646

Description

@lkraav

Bash completion script has a stub implementation for -T (and --above):

--above|-T)
    :
    return;;

: is a no-op that returns empty completions. Compare this with how --color is properly implemented:

--color)
    mapfile -t COMPREPLY < <(compgen -W "auto always ansi never" -- "$cur")
    return;;

Fix: -T/--above should complete with patch names. Looking at the logic, it should use the same _patch_range function that positional arguments use. Here's what it should be:

--below|--to|-t|--above|-T)
    _patch_range "$(_visible_patches)"
    return;;

AFAICT agent got it right, and monkey-patching this into /usr/share/bash-completion/completions/stg makes sink target completion work as I would expect.

Is there some subtle non-obvious reason this has been implemented as no-op thus far? Perhaps we could patch it in now?

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