-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
Description
$ cat << EOF > test.txt
> do
> not
> format
> these
> words
> =but
> =these
> =words
> =please
> EOF
$ ../gnu/src/fmt -p= test.txt
do
not
format
these
words
=but these words please
$ cargo run -q fmt -p= test.txt
do not format these words =but =these =words =please
$Or in general: GNU parses -p=ANYTHING to be the prefix =ANYTHING, whereas clap parses the same argument as the different string ANYTHING. This cannot be easily recovered, and basically requires parsing the arguments from scratch again.
This also affects many other tools. I think it was already documented somewhere, but I couldn't find it.
I see this as yet another strong argument in favor of #4254.