malxau / yori

Yori is a CMD replacement shell that supports backquotes, job control, and improves tab completion, file matching, aliases, command history, and more.
http://www.malsmith.net/yori/
MIT License
1.25k stars 31 forks source link

COPY and MOVE utilities do not overwrite read-only files #78

Closed aleaksunder closed 3 years ago

aleaksunder commented 3 years ago

This is correct behavior but there is no option to overwrite such files, at least now I can not see any of it... I have not tested with Hidden and System attributes, but maybe a couple of additional switches to COPY and MOVE will be useful:

-oR to overwrite Read-Only
-oH to overwrite Hidden
-oS to overwrite System

Only trick here that I see is what to do if you specify only -oR switch but file has Read-Only and Hidden attributes or System as well... maybe it will be simplier to make only one option:

-o to overwrite everything
malxau commented 3 years ago

Yori has generally just ignored these attributes on the basis that they're legacy from a time when these things couldn't be described with ACLs. I updated copy, move and co to overwrite these.

aleaksunder commented 3 years ago

Excelent! Thanks a lot!