`ag --nofilename` leaves newlines between output for individual files

Bug #1874311 reported by Dan Watkins
6
This bug affects 1 person
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
ProcVersionSignature: Ubuntu 5.4.0-21.25-generic 5.4.27
Uname: Linux 5.4.0-21-generic x86_64
NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair nvidia_modeset nvidia
ApportVersion: 2.20.11-0ubuntu27
Architecture: amd64
CasperMD5CheckResult: skip
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)

Revision history for this message
Dan Watkins (oddbloke) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.