brew: brew bash competion error line 27
brew doctor output
brew doctor
Your system is ready to brew.
Verification
- My “
brew doctoroutput” above saysYour system is ready to brew.and am still able to reproduce my issue. - I ran
brew updatetwice and am still able to reproduce my issue. - This issue’s title and/or description do not reference a single formula e.g.
brew install wget. If they do, open an issue at https://github.com/Homebrew/homebrew-core/issues/new/choose instead.
brew config output
HOMEBREW_VERSION: 3.6.21
ORIGIN: https://github.com/Homebrew/brew
HEAD: 932d2cf3b77c9439a57b6a43577fc8d3b6399a62
Last commit: 8 days ago
Core tap origin: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 5a240c5e373c212ff7a4ecd955afee76d798bbd7
Core tap last commit: 36 minutes ago
Core tap branch: master
Core tap JSON: 06 Feb 16:27 UTC
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_MAKE_JOBS: 12
Homebrew Ruby: 2.6.10 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
CPU: dodeca-core 64-bit arm_blizzard_avalanche
Clang: 14.0.0 build 1400
Git: 2.37.1 => /Applications/Xcode.app/Contents/Developer/usr/bin/git
Curl: 7.86.0 => /usr/bin/curl
macOS: 13.2.1-arm64
CLT: 14.2.0.0.1.1668646533
Xcode: 14.2
Rosetta 2: false
What were you trying to do (and why)?
I want to use bash completion
What happened (include all command output)?
when my bash_profile try to run script for bash completion that include /opt/homebrew/etc/bash_completion.d/brew then I see error:
-bash: /opt/homebrew/etc/bash_completion.d/brew: line 27: syntax error near unexpected token `<'
-bash: /opt/homebrew/etc/bash_completion.d/brew: line 27: ` while read -r line; do COMPREPLY+=("${line}"); done < <(compgen -W "${list}" -- "${cur}")'
What did you expect to happen?
not see error
Step-by-step reproduction instructions (by running brew commands)
Remove bash completion, remove /opt/homebrew/etc/bash_completion.d/brew file
now everything works
install bash-comletion:
brew install bash-completion
error again show
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 16 (14 by maintainers)
Commits related to this issue
- completions/bash/brew: Fix testing for POSIX mode in bash >= 3.2.57 https://github.com/Homebrew/brew/issues/14643 — committed to timvisher/brew by timvisher a year ago
- completions/bash/brew: Fix testing for POSIX mode in bash >= 3.2.57 https://github.com/Homebrew/brew/issues/14643 — committed to timvisher/brew by timvisher a year ago
- completions/bash/brew: Fix testing for POSIX mode in bash >= 3.2.57 https://github.com/Homebrew/brew/issues/14643 — committed to timvisher/brew by timvisher a year ago
I think
shoptcan’t set/unset POSIX mode,setcan (shopt -olists options to be used withset). Regarding whether it is going to work: it should, but, honestly, switching POSIX mode back and forth in a function doesn’t strike me as the best idea.@maxim-belkin could this be related to the recent completion changes?