Right now, systemlist() doesn't make it possible to tell if the output ended 
with a NL or not:

systemlist("cat", "aa\nbb") ==> ['aa', 'bb']
systemlist("cat", "aa\nbb\n") ==> ['aa', 'bb']

This is also inconsistent with it's documentation, which says an empty string 
should be added to the output list in the secound case (as with the 'binary' 
flag of readfile() ) Possible solution could be to add a flag (similar to 
`keepempty` of split() to change this (without breaking code expecting the 
present behaviour)

systemlist("cat", "aa\nbb",1) ==> ['aa', 'bb']
systemlist("cat", "aa\nbb\n",1) ==> ['aa', 'bb','']

This would have the nice property that systemlist("cat", somelist) == somelist

systemlist("cat", ['aa','bb'],1) ==> ['aa', 'bb']
systemlist("cat", ['aa','bb',''],1) ==> ['aa', 'bb','']

Best,
Björn

-- 
-- 
You received this message from the "vim_dev" 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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui