Skip to content
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

mv: if more than one of -i, -f, -n is specified, only the final one takes effect #4826

Merged
merged 3 commits into from
May 6, 2023

Conversation

cakebaker
Copy link
Contributor

This PR ensures that when using -i -n and -n -i the last argument wins, thus leading to different behavior. A message is shown in the first case, and a prompt in the second case.

Closes #4795

@shinhs0506
Copy link
Contributor

@cakebaker
Copy link
Contributor Author

Good point, thanks. And yes, -f should also be covered.

@cakebaker cakebaker marked this pull request as draft May 5, 2023 12:25
@cakebaker cakebaker marked this pull request as ready for review May 5, 2023 13:19
@cakebaker cakebaker changed the title mv: different behavior for -i -n and -n -i (#4795) mv: if more than one of -i, -f, -n is specified, only the final one takes effect May 5, 2023
@cakebaker
Copy link
Contributor Author

In the latest push -f is also covered and I documented the new behavior in the markdown file. Then, I noticed that the content of the markdown file is not shown when calling --help and fixed it, too.

src/uu/mv/mv.md Outdated Show resolved Hide resolved
Co-authored-by: Sylvestre Ledru <[email protected]>
@sylvestre sylvestre merged commit 9ed7ac1 into uutils:main May 6, 2023
@cakebaker cakebaker deleted the mv_4795 branch May 6, 2023 15:36
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.

mv: -i -n should have different behavior than -n -i if target exists
3 participants