Piping the output of rbw list to head results in a panic:
$ rbw list | head -n 1
<first entry>
thread 'main' panicked at 'failed printing to stdout: Broken pipe (os error 32)', library/std/src/io/stdio.rs:935:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Piping it into tail doesn't produce a panic, probably due to the pipe being closed after instead of before rbw is done writing to it.
Piping the output of
rbw list
tohead
results in a panic:Piping it into
tail
doesn't produce a panic, probably due to the pipe being closed after instead of beforerbw
is done writing to it.I haven't looked into it much, but this instance of the panic seems to be cause by the following
println!
macro call: https://github.com/doy/rbw/blob/94a0009fc2067bab549b194ca976a71e7395f403/src/bin/rbw/commands.rs#L533A fix would be to replace this with a
write!
, which returns an error that can be handled.If a fix is desired I might have time to look into it.