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

Clarify docs for -h/-H #174

Open
petdance opened this issue Dec 11, 2018 · 0 comments
Open

Clarify docs for -h/-H #174

petdance opened this issue Dec 11, 2018 · 0 comments
Labels

Comments

@petdance
Copy link
Collaborator

From ack --help

  -H, --with-filename           Print the filename for each match (default:
                                on unless explicitly searching a single file)
  -h, --no-filename             Suppress the prefixing filename on output

But it's not just the filename that it controls. It also controls the line number. The filename+linenumber are a matching set.

$ cat todo.txt | ack Fail -H
-
1:t/ack-color.t              (Wstat: 1024 Tests: 16 Failed: 4)
2:  Failed tests:  13-16

Is it bad that --with-filename and --no-filename doesn't just affect filename?

Also, this is probably related to #142. Are we going to have mutex issues with -n/--line-number and -h/--no-filename?

@petdance petdance added the docs label Jul 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant