Score:1

Bash Displaying Syntax Errors When Started

bd flag

I accidentally did

bash -a

While in my terminal. To try to fix it I did

set +a
bash -a
bash +a

and I removed and install bash-completion but it still returns

bash: _parse_usage: line 16: syntax error near unexpected token `('
bash: _parse_usage: line 16: ` -?(\[)+([a-zA-Z0-9?]))'
bash: error importing function definition for `_parse_usage'
bash: _longopt: line 6: syntax error near unexpected token `('
bash: _longopt: line 6: ` --!(no-*)dir*)'
bash: error importing function definition for `_longopt'

Whenever I type in bash or try to run a bash script. How do I fix this?

cn flag
There's nothing destructive about [`set -a`](https://www.gnu.org/software/bash/manual/bash.html#The-Set-Builtin). Does something in your [Startup Files](https://www.gnu.org/software/bash/manual/bash.html#Bash-Startup-Files) define `_parse_usage` and `_longopt`?
bd flag
I dont think that it destroyed anything because it works fine but it just shows those errors before the things that are returned from the bash file
hr flag
AFAIK they're both bash_completion functions - it's almost as if the bash_completion file is being sourced without extglob somehow
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.