-
Notifications
You must be signed in to change notification settings - Fork 79
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
Bug using | more #183
Comments
This is very strange. On Linux, I cannot reproduce this problem. What does |
|
Ok. Can you tell me the output of the following commands?
And:
And:
|
The first two output the same wrong data that is on the first comment; I just switched to jaq for get more speed, but not problem at all when using jq, dasel, or any other. For examples:
|
#177 solved this. |
Great! |
Hi, it seems that it's not solved, the bug is still on the latest v2.0.0-alpha and also on v1.6.0 (I've downloaded and builded it just for confirm it). Anything I can help let me know. |
@hellishvictor, can you post the output of the following commands, using v2.0.0-alpha.1?
|
Here is:
|
Ok, this is definitely weird. I've prepared a sample program for you: use std::io::{self, Write};
fn with_stdout<T>(f: impl FnOnce(&mut io::StdoutLock) -> io::Result<T>) -> io::Result<T> {
let mut stdout = io::stdout().lock();
let y = f(&mut stdout)?;
stdout.flush()?;
Ok(y)
}
fn main() -> io::Result<()> {
with_stdout(|out| {
writeln!(out, "[")?;
writeln!(out, " 0")?;
writeln!(out, "]")
})
} Can you save the above program as |
It does: |
Great. What does the following program do (again running fn main() {
println!("[");
println!(" 0");
println!("]");
} |
It outputs the same. |
OK. Then you'll likely have this behaviour with any Rust program, not just jaq. Therefore, this issue can only be solved at Rust-level. Can you open an issue at https://github.com/rust-lang/rust? |
Closing this because this issue is not only related to jaq. |
Hi, here on Win 7 x64 using
| more
on:curl -s https://theunitedstates.io/congress-legislators/legislators-current.json | jaq.exe --color=never .[] | more
it shows:
Cheers.
The text was updated successfully, but these errors were encountered: