ack3
ack3 copied to clipboard
Add `--no-lineno` Option to Omit Line Numbers
There's no way to produce the same output as grep:
grep -H ^root: /etc/passwd
/etc/passwd:root:*:0:0:System Administrator:/var/root:/bin/sh
ack --no-heading -H ^root: /etc/passwd
/etc/passwd:12:root:*:0:0:System Administrator:/var/root:/bin/sh
This PR fixes lets you:
ack --no-heading -H --no-lineno ^root: /etc/passwd
/etc/passwd:root:*:0:0:System Administrator:/var/root:/bin/sh
It is not immediately obvious if this PR addresses the previously discussed issue #311 head-on, or is only approximately the same issue.
There is a lot to discuss about this. I don't think it makes sense to have a --no-lineno
to force off line numbers without a --lineno
to force them on, which is something that people have wanted for a while.
Let's move this discussion over to the original ticket at #142.