`ag --nofilename` leaves newlines between output for individual files
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
silversearcher-ag (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Steps to reproduce:
In a pristine directory:
$ echo foo > a
$ echo foo > b
$ ag foo # This is as expected
a
1:foo
b
1:foo
$ ag --nofilename foo # But not this
foo
foo
Actual behaviour:
"foo\n\nfoo"
Expected behaviour:
"foo\nfoo"
(This is particularly annoying when trying to use ag's output programmatically, because you have to ignore/skip the newlines.)
ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: silversearcher-ag 2.2.0-1
ProcVersionSign
Uname: Linux 5.4.0-21-generic x86_64
NonfreeKernelMo
ApportVersion: 2.20.11-0ubuntu27
Architecture: amd64
CasperMD5CheckR
CurrentDesktop: i3
Date: Wed Apr 22 15:23:35 2020
InstallationDate: Installed on 2019-05-07 (351 days ago)
InstallationMedia: Ubuntu 18.04.2 LTS "Bionic Beaver" - Release amd64 (20190210)
SourcePackage: silversearcher-ag
UpgradeStatus: Upgraded to focal on 2019-11-15 (159 days ago)