-
Notifications
You must be signed in to change notification settings - Fork 429
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
Should "drive rename" also rename the local file/directory? #459
Comments
Yap I agree, the only problem though is that you can't rollback locally and a lot of information has to be compared to make sure local and remote match up. I originally was going to implement it so that it works both ways but hesitated for a couple of reasons one of them being what you mentioned a local clash, not being able to rollback etc. I agree we could have an optional mode. BTW the exact same thing applies for move, delete, copy, new where they work only remotely. |
An alternative would be to have a shell wrapper; e.g., here's a quick hack:
|
Good one 👍 |
By default, rename will also rename the equivalent local path. This CL also allows toggling whether to rename local or remote. However, it resolves the file to change based off the remote path - To turn off local renaming ```shell $ drive rename --local=false a/b/c/d pam ``` - To turn off remote renaming ```shell $ drive rename --remote=false bcd tkf ``` It also warns the user of an error if they turn off all modes. ```shell $ drive rename --local=false --remote=false 5 6 no rename mode set, set either `local` or `remote` mode $ echo $? 8 ``` Fixes #459.
By default, rename will also rename the equivalent local path. This CL also allows toggling whether to rename local or remote. However, it resolves the file to change based off the remote path - To turn off local renaming ```shell $ drive rename --local=false a/b/c/d pam ``` - To turn off remote renaming ```shell $ drive rename --remote=false bcd tkf ``` It also warns the user of an error if they turn off all modes. ```shell $ drive rename --local=false --remote=false 5 6 no rename mode set, set either `local` or `remote` mode $ echo $? 8 ``` Fixes #459.
Hello @smblott-github, thank you for the patience. I got sometime finally tonight and implemented this with #632. Please get the latest. |
That's pretty weird.
Might it be better to rename the local file/directory too, if present?
A bad use case would be if there's a local file/directory which just happens to have the same name. So perhaps such a feature would have to be optional:
The text was updated successfully, but these errors were encountered: