Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't Color --output='$f' #350

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

DabeDotCom
Copy link

The following seems inconsistent:

ack ^root: --output='Matched line $. of file $f' /etc/passwd /dev/null
/etc/passwd       <-- green
12:Matched line 12 of file /etc/passwd
^^              ^^         ^^^^^^^^^^^
yellow          white      green

This PR makes it so only the "metadata" is colored, not the actual --output

[NOTE: This came up while I was working on my forthcoming PR, which will add a --no-lineno option...]

Squashed commit of the following:

commit 1ffe7e4
Author: Dabrien 'Dabe' Murphy <[email protected]>
Date:   Fri Dec 3 19:48:42 2021 -0500

    Implement 'output-color' Changes (TDD "Green")

commit bbf6ca1
Author: Dabrien 'Dabe' Murphy <[email protected]>
Date:   Fri Dec 3 19:47:11 2021 -0500

    Add Desired (TDD "Red") 'output-color' Test

commit 1fe31ee
Author: Dabrien 'Dabe' Murphy <[email protected]>
Date:   Fri Dec 3 19:07:14 2021 -0500

    Add Initial (Passing) `t/ack-output-color.t` Test

    NOTE: This serves to document *current* behavior
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant