Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the ack CPAN distribution.

Maintainer(s)' notes

ack's issues are tracked at https://github.com/petdance/ack2

Report information
The Basics
Id: 24230
Status: resolved
Priority: 0/
Queue: ack

People
Owner: Nobody in particular
Requestors: rick [...] shadowspar.dyndns.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: [PATCH] Multiple bugs in -o
Date: Fri, 5 Jan 2007 02:56:49 -0500
To: bug-ack [...] rt.cpan.org
From: Rick Scott <rick [...] shadowspar.dyndns.org>
-------------------------------------------------------------------- 1: -o takes an argument when it shouldn't. -------------------------------------------------------------------- According to the docs, -o should show only the matching text, but the current Getopt::Long config makes it synonymous with --output. So, ack -a -o Sue t/text/boy-named-sue.txt gets parsed as output-on-match="Sue", regex="t/text/boy-named-sue.txt", path-to-search=default to cwd. Show quoted text
shade> ack -a Sue t/text/boy-named-sue.txt
Was before he left, he went and named me Sue. I tell ya, life ain't easy for a boy named Sue. Sat the dirty, mangy dog that named me Sue. And I said: "My name is Sue! How do you do! Now you gonna die!" Cause I'm the son-of-a-bitch that named you Sue." Bill or George! Anything but Sue! I still hate that name! -- "A Boy Named Sue", Johnny Cash Show quoted text
shade> ack -a -o Sue t/text/boy-named-sue.txt
Sue Sue Sue Sue Show quoted text
shade> grep -o Sue t/text/boy-named-sue.txt
Sue Sue Sue Sue Sue Sue Sue Show quoted text
shade> ack -a t/text/boy-named-sue.txt
t/ack-c.t 30: t/text/boy-named-sue.txt:0 t/ack-v.t 11: t/text/boy-named-sue.txt 32: t/text/boy-named-sue.txt:72 MANIFEST 55:t/text/boy-named-sue.txt -------------------------------------------------------------------- 2: -o suppresses filenames; grep -o does not. -------------------------------------------------------------------- (As discussed.) Ack should emulate grep and show filenames when searching with -o unless explicitly suppressed with -h. Cheers, Rick -- key CF8F8A75 / print C5C1 F87D 5056 D2C0 D5CE D58F 970F 04D1 CF8F 8A75 Everyone praises what he believes; his god is his own creature, and in praising it he praises himself. Consequently he blames the beliefs of others, which he would not do if he were just, but his dislike is based on ignorance. :Muid ad-Din ibn al-Arabi

Message body is not shown because sender requested not to inline it.