Fix lines for windows

This commit is contained in:
Jonathan Turner 2019-06-24 14:00:53 +12:00
parent 7957fc502f
commit 62368644fa

View file

@ -12,8 +12,7 @@ pub fn lines(args: CommandArgs) -> Result<OutputStream, ShellError> {
let stream = input
.map(move |v| match v {
Value::Primitive(Primitive::String(s)) => {
let splitter = "\n";
let split_result: Vec<_> = s.split(&splitter).filter(|s| s.trim() != "").collect();
let split_result: Vec<_> = s.lines().filter(|s| s.trim() != "").collect();
trace!("split result = {:?}", split_result);