Skip to content

grep: warning: stray \ before - #217

@wknapik

Description

@wknapik

On commit, I get

grep: warning: stray \ before -

that's caused by the following pattern

% git config --get-all secrets.patterns|grep ACCOUNT                                                                                          
("|')?(AWS|aws|Aws)?_?(ACCOUNT|account|Account)_?(ID|id|Id)?("|')?\s*(:|=>|=)\s*("|')?[0-9]{4}\-?[0-9]{4}\-?[0-9]{4}("|')?
%

as demonstrated by

% grep -E "(\"|')?(AWS|aws|Aws)?_?(ACCOUNT|account|Account)_?(ID|id|Id)?(\"|')?\\s*(:|=>|=)\\s*(\"|')?[0-9]{4}\\-?[0-9]{4}\\-?[0-9]{4}(\"|')?"
grep: warning: stray \ before -
grep: warning: stray \ before -

This is on up-to-date Arch Linux and git-secrets 1.3.0 (the latest tag, from 3.5 years ago, which contains the latest master version of the git-secrets script).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions