bgrep icon indicating copy to clipboard operation
bgrep copied to clipboard

`-B` fails with `lseek: Invalid argument` if it would start before the beginning of the file

Open cirosantilli opened this issue 1 year ago • 0 comments

Would be better to just start from 0 instead in that case:

printf '\x01\x02\x03' > tmp

Good:

bgrep -B2 03 tmp

output:

tmp: 00000002
\x01\x02

Bad:

bgrep -B3 03 tmp

output:

tmp: 00000002
lseek: Invalid argument

cirosantilli avatar Oct 09 '23 23:10 cirosantilli