dotfiles: Bash-Completion Errors

I’ve installed this dotfiles-repo on a newly installed Yosemite Machine. I also ran brew.sh after installing homebrew. Everything works as expected, but not in the terminal.

After reboot each terminal starts with lots of errors:

-bash: declare: -A: invalid option 
declare: usage: declare [-afFirtx] [-p] [name[=value] ...]
-bash: complete: -D: invalid option
complete: usage: complete [-abcdefgjksuv] [-pr] [-o option] [-A action] [-G globpat] [-W wordlist] [-P    prefix] [-S suffix] [-X filterpat] [-F function] [-C command] [name ...]

Also, when i want to use bash completion, something like this happens:

mv Dropb-bash: ${prev,,}: bad substitution

I typed “mv Dropb” and pressed the Tab-key then. The other characters “-bash: $(prev…” occur then and restricts me to use the bash completion as it was possible before installing these dotfiles.

which part of the dotfiles should i change (or delete) to fix these issues?

About this issue

  • Original URL
  • State: open
  • Created 9 years ago
  • Comments: 32 (13 by maintainers)

Commits related to this issue

Most upvoted comments

Thanks a lot!

By the way, these both lines will fix these issues, maybe they could be part of the brew.sh script?

sudo bash -c 'echo /usr/local/bin/bash >> /etc/shells'
chsh -s /usr/local/bin/bash

@itinance Here’s a slightly more robust version:

if ! grep '/usr/local/bin/bash' /etc/shells; then
  echo '/usr/local/bin/bash' | sudo tee -a /etc/shells;
  chsh -s /usr/local/bin/bash;
fi;