Skip to content

Use the grep command instead of an alias in bash completions #1622

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

Merged
merged 2 commits into from
Jun 18, 2023
Merged

Use the grep command instead of an alias in bash completions #1622

merged 2 commits into from
Jun 18, 2023

Conversation

BojanStipic
Copy link
Contributor

Problem:

If a user has a grep alias, such as this:

  alias grep='grep --perl-regexp'

Running the bash completions script will break with the following output:

  grep: conflicting matchers specified

This happens because the script tries to use the -F/--fixed-strings flag, which conflicts with --perl-regexp flag.

Solution:

Prefix grep with \ so that the grep command is always used instead of an alias.

BojanStipic and others added 2 commits June 17, 2023 16:41

Verified

This commit was signed with the committer’s verified signature.
danielroe Daniel Roe
**Problem**:

If a user has a grep alias, such as this:

```
  alias grep='grep --perl-regexp'
```

Running the bash completions script will break with the following output:

```
  grep: conflicting matchers specified
```

This happens because the script tries to use the `-F/--fixed-strings` flag, which conflicts with
`--perl-regexp` flag.

**Solution**:

Prefix grep with `\` so that the grep command is always used instead of
an alias.

Verified

This commit was signed with the committer’s verified signature.
danielroe Daniel Roe
@casey casey enabled auto-merge (squash) June 18, 2023 00:03
@casey casey disabled auto-merge June 18, 2023 00:03
@casey casey enabled auto-merge (squash) June 18, 2023 00:03
@casey casey merged commit f44abdf into casey:master Jun 18, 2023
@casey
Copy link
Owner

casey commented Jun 18, 2023

Nice, merged!

@BojanStipic BojanStipic deleted the bash-completions-command-grep branch June 18, 2023 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants