Subject: Re: [PATCH] _describe and literal \n
From: Bart Schaefer <[email-masked]>
To: [email-masked]
Date: Sat, 23 Jul 2016 13:00:59 -0700
List-Id: Zsh Workers List <zsh-workers.zsh.org>

On Jul 23,  6:04pm, Daniel Shahaf wrote:
}
} Gives:
} [[[
} % f <TAB>
} bar  -- lorem\nipsum
} foo  -- hello\nworld
} ]]]
} 
} Is this fix correct?

Boy, that's a tough one.  If the embedded newlines mess up something else,
like for example menuselect keeping track of lines/columns/cursor, then
I'd say this is the closest thing to a correct quick-fix.

On the other hand if the extra newlines are handled correctly, then I'd
say this fix isn't warranted, and it's up to the caller to decide what
is meant when a newline appears in the descriptions.

Ideally the newlines would get noticed and the result would be more like

[[[
% f <TAB>
bar  -- lorem
        ipsum
foo  -- hello
        world
]]]

but that seems a tall hill to climb.