Skip to content

Commit 79fb8de

Browse files
committed
fix/hanging-perf
1 parent b6ae113 commit 79fb8de

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/zsh.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -195,11 +195,10 @@ _${name}() {
195195
if [ $((directive & shellCompDirectiveNoFileComp)) -ne 0 ]; then
196196
__${name}_debug "deactivating file completion"
197197
198-
# We must return an error code here to let zsh know that there were no
199-
# completions found by _describe; this is what will trigger other
200-
# matching algorithms to attempt to find completions.
201-
# For example zsh can match letters in the middle of words.
202-
return 1
198+
# Return 0 to indicate completion is finished and prevent zsh from
199+
# trying other completion algorithms (which could cause hanging).
200+
# We use NoFileComp directive to explicitly disable file completion.
201+
return 0
203202
else
204203
# Perform file completion
205204
__${name}_debug "Activating file completion"

0 commit comments

Comments
 (0)