Comments (7)
I'm moving this to nushell since it's not really about our documentation.
from nushell.
You mean like 0x[deadbeef]
? We also support 0b[101010]
and 0o[1234]
from nushell.
@fdncred OK, I think my choice of example is confusing. I mean something like b"Hello world"
should be parsed as a 11-bytes binary blob.
This is different from 0x[deadbeef]
, which is a 4-bytes binary blob.
from nushell.
in your "patching" example, bytes replace
wants to use 0x[123]
format for matching/replacing bytes.
you can also do "hello world" | into binary
to get the binary data.
from nushell.
you can also do "hello world" | into binary to get the binary data.
Exactly. I'm just suggesting a syntax shortcut for this. Without this syntax, I'll have to write:
open ./a.out | bytes replace --all ('deadbeef' | into binary) ('livebeef' | into binary)
This is the same syntax used by Python and Rust to specify bytes literals.
from nushell.
By the way, does into binary
make any guarantee about text encoding? I don't see this mentioned in the docs.
from nushell.
I'm not sure. You'd have to look at the code. https://github.com/nushell/nushell/blob/main/crates/nu-command/src/conversions/into/binary.rs
from nushell.
Related Issues (20)
- Flag metadata is only set for `--flag=bool` form
- Completion highighting makes path invisible HOT 3
- git ls-files output does not work in pipeline HOT 2
- `PipelineData::into_value` implicitly waits for `ExternalStream` to finish and irreversibly converts it HOT 2
- Capturing variable inside an alias within `config.nu` causes a panic
- A flag to make nushell check its configs and exit
- start https://www.nushell.sh will open multiple instances HOT 3
- [Feature Request] umask functionality
- Behavior of `~` is inconsistent with user expectation HOT 3
- `help command` repeats help for any aliases
- mv breaks files if partially failed
- Command mode supports positional arguments HOT 2
- Allow `rename` to handle possibly-empty columns
- find command adds colors to result also in scripts
- "to json --raw" does not “remove all whitespace” as documented
- Command `debug info` reports incorrect mem usage HOT 4
- 0.90.1 regression: alt+d throws an error message HOT 15
- run-external is expanding globs (but shouldn't on Windows) with no way to opt out HOT 1
- Redirection: `e>|` and `e>` doesn't work properly if external command runs failed
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nushell.