Skip to content

Fails to search /etc without explicit listing it #1555

@MaxG87

Description

@MaxG87

Today I wanted to learn why one of my systems has EDITOR set and another not. To avoid having to think hard I did what was more convenient: A full-system full-text search. Unfortunately this failed to find the relevant file /etc/environment.

This command does not find it:

$ cd /
$ ag 'EDITOR' / 2>/dev/null -l | grep etc
$ # no output

However, this command does find it:

$ cd /
$ ag 'EDITOR' /etc 2>/dev/null -l | grep etc
/etc/environment
/etc/mail.rc
/etc/neomuttrc
/etc/texmf/xdvi/XDvi

I'd like to better understand this behaviour! Why is ag ignoring /etc?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions