Skip to content

respect hidden file attribute #1154

@ghost

Description

currently RipGrep considers a hidden file something starting with ., which is a
long time Linux convention

/// Returns true if and only if this file path is considered to be hidden.
#[cfg(not(unix))]
pub fn is_hidden<P: AsRef<Path>>(path: P) -> bool {
if let Some(name) = file_name(path.as_ref()) {
name.to_str().map(|s| s.starts_with(".")).unwrap_or(false)
} else {
false
}
}

However the Windows convention of the hidden file attribute is not recognized by
RipGrep. So if you have some files on Windows with the hidden file attribute,
RipGrep will always show them regardless, unless they also happen to start with .

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions