Fix extension completion
When inserting $extensionName in $COMP_WORDS manually, $COMP_CWORD lags behind by one. Needs a manual adjustment too.
This commit is contained in:
parent
4101fdf3bb
commit
c2da8ac2d4
@ -97,6 +97,7 @@ _hledger_extension_completion_function() {
|
||||
# normal hledger completion function.
|
||||
local extensionName=${cmd#*-}
|
||||
COMP_WORDS=( "hledger" "$extensionName" "${COMP_WORDS[@]:1}" )
|
||||
COMP_CWORD=$((COMP_CWORD + 1))
|
||||
_hledger_completion_function "hledger" "$@"
|
||||
}
|
||||
|
||||
|
||||
@ -97,6 +97,7 @@ _hledger_extension_completion_function() {
|
||||
# normal hledger completion function.
|
||||
local extensionName=${cmd#*-}
|
||||
COMP_WORDS=( "hledger" "$extensionName" "${COMP_WORDS[@]:1}" )
|
||||
COMP_CWORD=$((COMP_CWORD + 1))
|
||||
_hledger_completion_function "hledger" "$@"
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user