-
Notifications
You must be signed in to change notification settings - Fork 61
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
Group removals by invocations #10
Comments
Thanks for using rip! From a UX standpoint this makes total sense, but I don't know of a good way to implement this. The challenge is that glob expansion happens in the shell, before the argument is passed in the program. So as far as rip is concerned, these are totally separate invocations. One possible solution would be to dig into the bash_history/zhistory etc. and infer batching from that but I would like to figure out something less hacky. Another way might be to write timestamps to the graveyard file and have -u restore everything within a certain margin of the last entry. That seems better but still might have result in some weird interactions. |
Isn't it one invocation with several arguments? |
Yup and I have no idea why I thought otherwise other than inferring a nonexistent loop or mixing it up with the wrong understanding of xargs. Of course that's done in Rust so this can be trivially implemented - probably a invocation id per graveyard entry. Sent from my T-Mobile 4G LTE Device
-------- Original message --------From: Jan Niklas Hasse <notifications@github.com> Date: 2/21/19 2:06 AM (GMT-08:00) To: nivekuil/rip <rip@noreply.github.com> Cc: Kevin Liu <nivekuil@gmail.com>, Comment <comment@noreply.github.com> Subject: Re: [nivekuil/rip] Group removals by invocations (#10)
So as far as rip is concerned, these are totally separate invocations.
Isn't it one invocation with several arguments?
—You are receiving this because you commented.Reply to this email directly, view it on GitHub, or mute the thread.
{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/nivekuil/rip","title":"nivekuil/rip","subtitle":"GitHub repository","main_image_url":"https://github.githubassets.com/images/email/message_cards/header.png","avatar_image_url":"https://github.githubassets.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/nivekuil/rip"}},"updates":{"snippets":[{"icon":"PERSON","message":"@jhasse in #10: \u003e So as far as rip is concerned, these are totally separate invocations.\r\n\r\nIsn't it one invocation with several arguments?"}],"action":{"name":"View Issue","url":"#10 (comment)"}}}
[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "#10 (comment)",
"url": "#10 (comment)",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]
|
I often clear directories with lots of files using
rip *
. If I want to undo that operation,rip -u
will only undo one deletion, since the shell expands*
into all files in the current directory.As an alternative I can do
rip $PWD
, but this break my shell, as it also removes the current working directory itself.So my suggestion would be that
rip -u
would undo the last invocation. E.g. after doingrip a b
,rip -u
would restore botha
andb
.The text was updated successfully, but these errors were encountered: