Hacker News new | ask | show | jobs
by kris_wayton 1241 days ago
I suppose you would have to know to run "list all files that..." prior to "delete all files that...".
1 comments

That's just asking for it. A nice little model reload in the middle of those two statements, or maybe the difference between 'delete' and 'list' is enough to enable 'evil mode' which then does something entirely different.

I'd list the files to a file and then process that file after checking for errors in a way that doesn't allow for new errors to be introduced. Better still I'd ask it to generate a command which lists the files, look it over, execute it and if that lists the right files manually change the 'ls' to 'rm'. Otherwise you're at the mercy of the gods. Who are like sysops: subtle and quick to anger.