Add an early return from option argument completion
Do not even enter the case statement if preceding words don't look like an option
This commit is contained in:
parent
b6a4a887b9
commit
eea7f0d506
@ -213,6 +213,8 @@ _hledger_compreply_optarg() {
|
|||||||
optionIndex=$((cword - 2))
|
optionIndex=$((cword - 2))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
[[ ${words[optionIndex]} == -* ]] || return
|
||||||
|
|
||||||
case ${words[optionIndex]} in
|
case ${words[optionIndex]} in
|
||||||
--alias)
|
--alias)
|
||||||
compopt -o nospace
|
compopt -o nospace
|
||||||
|
|||||||
@ -213,6 +213,8 @@ _hledger_compreply_optarg() {
|
|||||||
optionIndex=$((cword - 2))
|
optionIndex=$((cword - 2))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
[[ ${words[optionIndex]} == -* ]] || return
|
||||||
|
|
||||||
case ${words[optionIndex]} in
|
case ${words[optionIndex]} in
|
||||||
--alias)
|
--alias)
|
||||||
compopt -o nospace
|
compopt -o nospace
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user