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

Add -no-prompt flag to drive delete #448

Closed
fabianhjr opened this issue Oct 28, 2015 · 13 comments
Closed

Add -no-prompt flag to drive delete #448

fabianhjr opened this issue Oct 28, 2015 · 13 comments
Assignees
Milestone

Comments

@fabianhjr
Copy link

There should be an option to be able to shot onself in the foot. \o/

(Want to purge some Google Drive Photos using drive delete -no-prompt */*/G*.JPG in Google Photos Directory with fish the Friendly Shell)

@odeke-em
Copy link
Owner

Hello @fabianhjr! Thanks for reporting this issue and welcome to drive.

So I have always been reluctant to add a --no-prompt flag to a permanent deletion operation and moreoever one with matches because users have posted issues where they used operations without prior knowledge of what it does and then drive trash [paths...], and the remedy to undo it would be usually to drive untrash but with drive delete there is no going back. Let me know what you think after seeing my rationale.

For starters if you want to do this before this issue is decided, you can do so by

$ function yYes { while [ 1 ]; do echo "yes";done; }
$ yYes | drive delete */*/G*.JPG

or lookup Unix utility "yes"

@fabianhjr
Copy link
Author

Hello @odeke-em C:

Thanks for the suggestion I will definetly give that a try though I noticed
rm'ing and drive push does delete the server version. Only thing is I am
being rate limited now :(

I understand the rational behind not having this feature; and now that
yes was mentioned I am quite sure that if anyone else wishes this
destructive no-prompt they should be able to acomplish it by themselves.
Maybe have the no-prompt in drive delete point to this issue and if
someone really wants to bulk delete have them use yes or a bash/zsh/fish
script?

@odeke-em
Copy link
Owner

Yeah the server side version could easily be put in a .trash folder in the future. However, am still hesitant about enabling --no-prompt for the same reasons that the Google Drive UI doesn't expose the actual delete because that's the line of defence that a user has.

@fabianhjr
Copy link
Author

Well, yeah, that's why I opened the ticket with "There should be an option to be able to shot onself in the foot. \o/" Though having the yes information for the Icarus that likes to live dangerously would be enough.

@odeke-em
Copy link
Owner

Alright alright. So what would the purpose of --no-prompt in code linking to this issue be?

@fabianhjr
Copy link
Author

Explaining why it isn't a feature and what can the user do if he/she
desires to bulk delete a bunch of stuff.

On Wed, Oct 28, 2015 at 2:05 AM, Emmanuel Odeke [email protected]
wrote:

Alright alright. So what would the purpose of --no-prompt in code linking
to this issue be?


Reply to this email directly or view it on GitHub
#448 (comment).

@odeke-em
Copy link
Owner

Good reasoning, thanks! PR coming up in a second.

@odeke-em
Copy link
Owner

PR here #450

@odeke-em
Copy link
Owner

Let me know and I'll merge it into master whenever you are ready.

@fabianhjr
Copy link
Author

Yeah, sure. If someone is crazy enough to do drive delete --no-prompt they should be able to know why it wasn't implemented and what to do if they really want to live dangerously.

@odeke-em
Copy link
Owner

Addressed by #450. Thank you for opening and advocating this!

@fabianhjr
Copy link
Author

No, thank to you for maintaining this awesome tool. C: Came real handy to declutter stuff.

@odeke-em
Copy link
Owner

Thanks for the kind words!

@odeke-em odeke-em self-assigned this Oct 29, 2015
@odeke-em odeke-em added this to the v0.3.2 milestone Oct 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants