Dont add formatting escape codes to completion descriptions in ZSH

ZSH gets confused by them, causes the text to move up a line when
completing after the first line
This commit is contained in:
Kovid Goyal 2021-07-11 21:46:17 +05:30
parent b813e1f7ab
commit cf5ed54c84
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -222,7 +222,6 @@ def zsh_output_serializer(ans: Completions) -> str:
desc = desc[:truncate_point_for_length(desc, max_desc_len - 2)] desc = desc[:truncate_point_for_length(desc, max_desc_len - 2)]
desc += '' desc += ''
word = f'\x1b[32m{word}\x1b[39m'
if multiline: if multiline:
ans = f'{word}\n {desc}' ans = f'{word}\n {desc}'
else: else: