Skip to content

Clarify docs for -h/-H #174

Open
Open
@petdance

Description

@petdance

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions