Skip to content

Into binary changes#3758

Merged
fdncred merged 4 commits intonushell:mainfrom
fdncred:into_binary_changes
Jul 9, 2021
Merged

Into binary changes#3758
fdncred merged 4 commits intonushell:mainfrom
fdncred:into_binary_changes

Conversation

@fdncred
Copy link
Copy Markdown
Contributor

@fdncred fdncred commented Jul 9, 2021

many updates to make into binary more composable. no skip/bytes filtering is performed any longer by into binary or binaryview or nu-pretty-hex. you have to specify it in the pipeline like open c:\some\big\file | into binary | first 100.

  • removed --bytes(-b) and --skip(-s) from into binary
  • removed --bytes(-b) and --skip(-s) from binaryview
  • fixed a bug in nu-prett-hex where String::from_utf8_lossy() was introducing characters that weren't actually there. This manifested by doing first 25 and nu-pretty-hex returning 30 bytes.
  • added is_binary() helper to UntaggedValue, returns true if Value is Primitive::Binary
  • added as_binary_vec helper to Value to return a Vec
  • changed first from ActionStream to OutputStream
  • updated first to work with Primitive::Binary
  • the skip command hasn't been updated yet to support binary

image

Closes #3414

@fdncred fdncred marked this pull request as draft July 9, 2021 17:59
@fdncred fdncred marked this pull request as ready for review July 9, 2021 21:43
@fdncred fdncred merged commit 56c7a99 into nushell:main Jul 9, 2021
@fdncred fdncred deleted the into_binary_changes branch July 9, 2021 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

into binary behavior is surprising

1 participant