Don't bother defining __get_cwordX on non-applicable bash versions.
This commit is contained in:
parent
c4c6eb7132
commit
cbd15cc8a0
@ -270,6 +270,7 @@ _get_cword()
|
|||||||
# _get_cword, main routine
|
# _get_cword, main routine
|
||||||
# __get_cword4, bash-4 variant
|
# __get_cword4, bash-4 variant
|
||||||
#
|
#
|
||||||
|
[ -z "$bash4" ] &&
|
||||||
__get_cword3()
|
__get_cword3()
|
||||||
{
|
{
|
||||||
if [[ "${#COMP_WORDS[COMP_CWORD]}" -eq 0 ]] || [[ "$COMP_POINT" == "${#COMP_LINE}" ]]; then
|
if [[ "${#COMP_WORDS[COMP_CWORD]}" -eq 0 ]] || [[ "$COMP_POINT" == "${#COMP_LINE}" ]]; then
|
||||||
@ -332,6 +333,7 @@ __get_cword3()
|
|||||||
# _get_cword, main routine
|
# _get_cword, main routine
|
||||||
# __get_cword3, bash-3 variant
|
# __get_cword3, bash-3 variant
|
||||||
#
|
#
|
||||||
|
[ -n "$bash4" ] &&
|
||||||
__get_cword4()
|
__get_cword4()
|
||||||
{
|
{
|
||||||
local i
|
local i
|
||||||
|
Loading…
x
Reference in New Issue
Block a user