#833059 coreutils: "du --exclude='*.jpg' /<Tab>" doesn't autocomplete

#833059#5
Date:
2016-07-31 10:44:48 UTC
From:
To:
Type the following:
du --exclude='*.jpg' /<Tab>

You will see that <Tab> doesn't autocomplete. "du /<Tab>" works normally.
bash-completion is installed. The following is uncommented in /etc/bash.bashrc:

# enable bash completion in interactive shells
if ! shopt -oq posix; then
  if [ -f /usr/share/bash-completion/bash_completion ]; then
    . /usr/share/bash-completion/bash_completion
  elif [ -f /etc/bash_completion ]; then
    . /etc/bash_completion
  fi
fi

Completion works normally in other utils (such as dpkg and apt).

#833059#14
Date:
2017-06-09 07:44:39 UTC
From:
To:
I'm on Wheezy with bash-completion version 2.1-4 and I can confirm. I
believe I have also narrowed the bug down.

This lists files in root:

$ du --exclude=asdf /<TAB>

But this (with quotes) does not:

$ du --exclude="asdf" /<TAB>

After a quick survey, it seems like it happens to all options that have an
equals sign (=) in them.

Sincerely,
Aditya Vaidya