mirror of
https://github.com/nushell/nushell
synced 2024-12-27 05:23:11 +00:00
Fix lines for windows
This commit is contained in:
parent
7957fc502f
commit
62368644fa
1 changed files with 1 additions and 2 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue