-
Notifications
You must be signed in to change notification settings - Fork 92
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
feat: builtin funtion rm
.
#401
Conversation
I'm thinking... can we insert some kind of runtime detection for removing some directories like To prevent this command from running - this is usually not the intended use of this command. If user really wants to remove the |
maybe a prefilled parameter that the developer can define, the code automatically should check if the path is part of that and shows an alert. |
Bash scripts are pretty unsafe by design. I would allow this as it is, it's just a syntax sugar for what you can already do. But I'm thinking, if we could create some kind of "secure compile" mode or "debug", where we create script but with something like strace so that someone can be sure, that the script is not doing anything funky. But that's a topic for another day |
Having a built in "rm" command that has "-rf" by default is for me a violation of principle of last suprise. default rm does not work like this. why should the build in rm more dangerous than the in the end i dont see any benefit of having it as built in. it is better placed as part of the std library. |
I think that needs just one parameter, to remove folders and a sanitization for the path. |
Okay. My stance on this is that if this builtin is destructive (dangerous) then let's keep it as a function library. I'm closing it and will update the built-in guidelines. If you think otherwise - please reopen and we can have a discussion on it. |
It uses the
-rf
flags by default.ref #215