[Bash-completion-devel] [PATCH] Bug#559953: COMP_WORDS: bad array subscript

Igor Murzov e-mail at date.by
Sun May 1 18:12:08 UTC 2011


> For example, write "ls" and then go to the start of line, what do you
> think $cur and $prev should be set to when completing at that point?  I
> think both of them should be empty, but then again I also think that in
> that case the "ls" completion should not be invoked at all which may be
> a bash bug. 

Let's fail _init_completion() if we detect that $cword equals to zero. This is 
sane I suppose.

-- Igor



More information about the Bash-completion-devel mailing list