According to POSIX, cp should allow the -P flag to work whether -R is specified or not. Currently, the -P option only works along with -R.
PR: 199466
Differential D30012
cp(1): Make -P work without -R as per POSIX me_cameronkatri.com on Apr 27 2021, 6:25 PM. Authored by Tags None Referenced Files
Details
According to POSIX, cp should allow the -P flag to work whether -R is specified or not. Currently, the -P option only works along with -R. PR: 199466
Diff Detail
Event TimelineComment Actions The man page isn't very clear, but the code looks right.
Comment Actions cp [-R [-H | -L | -P]] in the synopsis needs to be changed if -P can be used without -R. Comment Actions How is that supposed to look? Just move the -P out of the []? But -P still can't be used with -H or -L. Comment Actions Can -H or -L also be used without -P, or do they require it? What happens it you use 2 (or all 3) of -H, -L, and -P? Latest wins silently? Error? Something else? Comment Actions -H, -L, and -P conflict, the last one specified will silently win. -H and -L require -R, but -P does not. Comment Actions Then I'd go with either a single line: cp [-R [-H | -L] | -P |-R]] or two separate lines: cp [-R [-H | -L]] cp [-P [-R]] The latter looks clearer to me. Comment Actions I will commit this tomorrow afternoon-ish. Thanks! Can you confirm that this is your preferred name + email, please? --author="Cameron Katri <me@cameronkatri.com>" Comment Actions Thank you.
Yes, that's correct. |