-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Labels
bugA bug.A bug.rollupA PR that has been merged with many others in a rollup.A PR that has been merged with many others in a rollup.
Description
What version of ripgrep are you using?
ripgrep 12.1.1
+SIMD -AVX (compiled)
-SIMD -AVX (runtime)
How did you install ripgrep?
RUSTFLAGS="-C target-cpu=native" cargo +nightly install ripgrep --features 'simd-accel'
What operating system are you using ripgrep on?
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.7 LTS
Release: 16.04
Codename: xenial
Describe your bug.
ripgrep exits with the following error...
error: The argument '--pretty' was provided more than once, but cannot be used multiple times
...if -p or --pretty is in the configuration file and condensed short option syntax is used on the command line.
What are the steps to reproduce the behavior?
- Set up
RIPGREP_CONFIG_PATHand a configuration file containing-por--pretty - Run
ripgrepwith-p -zor--pretty -zat the command line. - Notice that it works as expected, as it should for use in scripts.
- Run
ripgrepwith-p -z -pat the command line - Notice that it works in an
alias-compatible way as it should. - Run
ripgrepwith-pzat the command line. - Get an error message.
What is the actual behavior?
$ rg -pz foo /usr/share/doc
error: The argument '--pretty' was provided more than once, but cannot be used multiple times
USAGE:
rg [OPTIONS] PATTERN [PATH ...]
rg [OPTIONS] [-e PATTERN ...] [-f PATTERNFILE ...] [PATH ...]
rg [OPTIONS] --files [PATH ...]
rg [OPTIONS] --type-list
command | rg [OPTIONS] PATTERN
For more information try --help
What is the expected behavior?
It shouldn't matter what form it takes.
What do you think ripgrep should have done?
-pz should behave identically to -p -z.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugA bug.A bug.rollupA PR that has been merged with many others in a rollup.A PR that has been merged with many others in a rollup.