Skip to content

Commit befbfc3

Browse files
committed
fix(_command_offset): discard previous results on retries
1 parent 6702ef1 commit befbfc3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

bash_completion

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2096,6 +2096,10 @@ _command_offset()
20962096

20972097
# restart completion (once) if function exited with 124
20982098
if (($? == 124 && retry_count++ == 0)); then
2099+
# Note: When the completion function returns 124, the state
2100+
# of COMPREPLY is discarded.
2101+
COMPREPLY=()
2102+
20992103
cspec=$(complete -p "$compcmd" 2>/dev/null)
21002104

21012105
# Note: When completion spec is removed after 124, we do

0 commit comments

Comments
 (0)