feat(comp): Safety check for comp failure

Signed-off-by: Marc Khouzam <marc.khouzam@montreal.ca>
pull/7690/head
Marc Khouzam 6 years ago
parent e50c0771b7
commit 1be0c9a236

@ -314,6 +314,11 @@ function __helm_get_completions
__helm_debug "Populated completion cache with: $__helm_cache_completions" __helm_debug "Populated completion cache with: $__helm_cache_completions"
end end
if test -z "$__helm_cache_completions"
__helm_debug "No completion, probably due to a failure"
return 0
end
set -l directive (string sub --start 2 $__helm_cache_completions[-1]) set -l directive (string sub --start 2 $__helm_cache_completions[-1])
set -l comps $__helm_cache_completions[1..-2] set -l comps $__helm_cache_completions[1..-2]

Loading…
Cancel
Save