You are not logged in.

#1 2008-06-21 21:56:46

Acecero
Member
Registered: 2008-06-21
Posts: 1,373

[SOLVED] Bash Completion Syntax Error

Hey guys,

I've been noticing this recently but every time I log into a CLI or start a terminal I get this error.

bash: /etc/bash_completion: line 227: syntax error near unexpected token `}'
bash: /etc/bash_completion: line 227: `}'

I checked the bash_completion file, though nothing seems to be anything wrong with it. I have not messed with it at all.

I'll pastebin it here if you guys see anything wrong.

http://code.bulix.org/e0a2s6-67178

Thanks in advance.

Last edited by Acecero (2008-06-23 16:24:19)

Offline

#2 2008-06-22 04:27:15

Factory
Member
Registered: 2008-02-24
Posts: 108

Re: [SOLVED] Bash Completion Syntax Error

On line 225 there looks to be an extra }. Take that out and see if this solves the problem.

Offline

#3 2008-06-22 04:46:34

Acecero
Member
Registered: 2008-06-21
Posts: 1,373

Re: [SOLVED] Bash Completion Syntax Error

hmm

   215    _signals()
   216    {
   217        local i
   218    
   219        # standard signal completion is rather braindead, so we need
   220        # to hack around to get what we want here, which is to
   221        # complete on a dash, followed by the signal name minus
   222        # the SIG prefix
   223        COMPREPLY=( $( compgen -A signal SIG${cur#-} ))
   224        for (( i=0; i < ${#COMPREPLY[@]}; i++ )); do
   225            COMPREPLY[i]=-${COMPREPLY[i]#SIG}
   226        done
   227    }

From the looks of it, I really don't see the extra? But if its the one near the #SIG, I'll give you an update on it.

UPDATE: No that one didn't do...

Last edited by Acecero (2008-06-22 04:49:48)

Offline

#4 2008-06-22 15:09:29

Acecero
Member
Registered: 2008-06-21
Posts: 1,373

Re: [SOLVED] Bash Completion Syntax Error

Ah, it turns out to be because of my .bashrc file. roll

Whenever you set an alias command to an existing command in the shell, bash_completion will have a complaint with it not having actual syntax error.

Just got to watch what I set for aliases.

Thanks for your help though, Factory. smile

Offline

#5 2008-06-24 12:24:10

Factory
Member
Registered: 2008-02-24
Posts: 108

Re: [SOLVED] Bash Completion Syntax Error

Heh, no prob. Sorry I couldn't answer it myself, though smile

Offline

Board footer

Powered by FluxBB