Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7431535
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T09:18:38+00:00 2026-05-29T09:18:38+00:00

I tried to install bash-completion for MSYS bash, but it seems it contains some

  • 0

I tried to install bash-completion for MSYS bash, but it seems it contains some syntax errors.
It fails with the following message

bash: /usr/local/share/bash-completion/bash_completion: line 625: syntax error in conditional expression: unexpected token `('
bash: /usr/local/share/bash-completion/bash_completion: line 625: syntax error near `^(\'
bash: /usr/local/share/bash-completion/bash_completion: line 625: `    if [[ $cur =~ ^(\$\{?)([A-Za-z0-9_]*)$ ]]; then'

here is the code that fails

# Complete variables.
# @return  True (0) if variables were completed, 
#          False (> 0) if not.
_variables()
{
    if [[ $cur =~ ^(\$\{?)([A-Za-z0-9_]*)$ ]]; then
        [[ $cur == *{* ]] && local suffix=} || local suffix=
        COMPREPLY+=( $( compgen -P ${BASH_REMATCH[1]} -S "$suffix" -v -- \
            "${BASH_REMATCH[2]}" ) )
        return 0
    fi
    return 1
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T09:18:39+00:00Added an answer on May 29, 2026 at 9:18 am

    You are using the beta version (1.99) of bash-completion, you can try the latest stable instead (1.3)

    If you really need the beta version you need quotes around the regular expression ^(\$\{?)([A-Za-z0-9_]*)$ in the line if [[ $cur =~ ^(\$\{?)([A-Za-z0-9_]*)$ ]]; then handling of the operator =~ is different depending on bash version (IIRC prior 3.2 quotes are required)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Tried to install some program, it gives above message requiring 1.1.4322. BUT as the
I've encountered some errors when I tried to install an artifact manually with Maven
I tried to install the Yahoo BOSS mashup framework, but am having trouble running
I tried to install gcc 4.5 on ubuntu 10.04 but failed. Here is a
I tried to create an alias in bash but am not able to do.
I tried to install sphinx on my Mac (OSX 10.6.7) but at the first
I have tried to install each of the following three versions of Ruby via
I tried to install XCode + the iPhone SDK on my mac, but the
I tried to install SOAP::WSDL on Ubuntu 8.04 Server through CPAN but got the
I tried to install Delphi 7 on Vista several times and Vista prevented me

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.