_init_completion: Fix out of bounds access to words when cword is 0.
This commit is contained in:
parent
ddbd28f638
commit
5c98d3160a
@ -737,7 +737,7 @@ _init_completion()
|
||||
i=$(( ++i ))
|
||||
fi
|
||||
done
|
||||
prev=${words[cword-1]}
|
||||
[[ $cword -ge 1 ]] && prev=${words[cword-1]} || prev=
|
||||
|
||||
return 0
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user