Thread (3 messages) flat view 3 messages, 2 authors, 2021-02-02

Bash completion suggests tags for git branch -D

From: Paul Jolly <hidden>
Date: 2021-02-02 06:03:18

Hi,

Easiest explained via a repro:

    cd $(mktemp -d)
    git init
    touch README
    git add -A
    git commit -am 'Initial commit'
    git checkout -b branch
    git tag b-is-a-tag

If you then type:

    git branch -D b^

leaving the cursor at the position shown by the caret, then attempt
completion via <Tab><Tab> (at least according to my bash setup) two
options are shown:

    b-is-a-tag   branch

b-is-a-tag is not a branch, so should not be offered as a completion
candidate in this instance.

Many thanks,


Paul
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help