Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow passing length in hex with 0x notation #45

Merged
merged 2 commits into from
Mar 9, 2019

Conversation

Qyriad
Copy link
Contributor

@Qyriad Qyriad commented Jan 20, 2019

This interprets a 0x in front of the value passed with --length/-n as a hexadecimal number.

@ErichDonGubler
Copy link
Contributor

Definitely related to #44. :)

@sharkdp
Copy link
Owner

sharkdp commented Jan 26, 2019

@Qyriad Thank you very much for your contribution!

We will need to bump the minimum required Rust version (in .travis.yml and the README) in order for CI to pass.

src/main.rs Outdated
@@ -258,7 +258,14 @@ fn run() -> Result<(), Box<::std::error::Error>> {

if let Some(length) = matches
.value_of("length")
.and_then(|n| n.parse::<u64>().ok())
.and_then(|n| {
if n.starts_with("0x") {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably also adapt the help-text to make users aware of this possibility.

@ErichDonGubler
Copy link
Contributor

Pinging @Qyriad to see if they're still able to attend to this.

@Qyriad
Copy link
Contributor Author

Qyriad commented Feb 10, 2019

Oh right; yeah I can do this in the next day or two.

@sharkdp
Copy link
Owner

sharkdp commented Mar 8, 2019

Sorry, I've missed your update. Could you please rebase this on master to resolve the conflicts? Thank you!

@Qyriad
Copy link
Contributor Author

Qyriad commented Mar 8, 2019

Done.

@sharkdp sharkdp merged commit 8bd7677 into sharkdp:master Mar 9, 2019
@sharkdp
Copy link
Owner

sharkdp commented Mar 9, 2019

Thank you!

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.

3 participants