Hi ZyX!

On Mo, 21 Feb 2011, ZyX wrote:

> > Replace ``read! echo $'\0''' with ``read!
> > {placeholder_for_command_that_has_NULLS_in_its_output}'' and you
> > will get `portable' example.

I am not sure, why you insist on NULL handling. Traditionally, shell 
scripts couldn't handle binary NULL. They were designed to handle "text" 
files and usually required \n delimited lines (with a max line length 
around 2048 I think).

The only command, I can think of, that produces NULL delimited output is 
find -print0 together with xargs -0 and even these parameters are not 
portable and in fact not even necessary. You can use "find -exec sh {} 
... " that can handle any input without losing portability.

So handling NULL is a corner case, that you can't expect to work 
reliably anyway and whether one likes system() or uses :read! is merely 
a matter of taste and shouldn't make a difference, besides, I don't see, 
how your code is "much less code" as you claimed initially.

regards,
Christian

-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Reply via email to