...
This commit is contained in:
parent
7168ceab94
commit
946589d1f1
@ -285,7 +285,10 @@ def zsh_output_serializer(ans: Completions) -> str:
|
||||
has_descriptions = any(matches.values())
|
||||
if has_descriptions or matches.word_transforms:
|
||||
lines.append('compdescriptions=(')
|
||||
sz = max(map(wcswidth, matches.transformed_words()))
|
||||
try:
|
||||
sz = max(map(wcswidth, matches.transformed_words()))
|
||||
except ValueError:
|
||||
sz = 0
|
||||
limit = min(16, sz)
|
||||
for word, desc in matches.transformed_items():
|
||||
lines.extend(map(shlex.quote, fmt_desc(word, desc, limit)))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user