Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [PATCH] _describe and literal \n



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.



Messages sorted by: Reverse Date, Date, Thread, Author