✨ More built-in commands
This issue is about implementing the following commands:
- ~~
cd(cd path: Text->cd path) failable: directory does not exist~~ - ~~
mv(mv a: Text, b: Text->mv a b) failable: no permissions~~ rm(rm path: Text->rm -rf path) failable: no permissions / file does not exitsexit(exit c: Numexit c)
On https://github.com/Ph0enixKM/Amber/pull/185 I added is_root and is_command that I think that should be built-in commands.
The second one just check if a command exists.
I'm still thinking about that ORM style you suggested. To make such a nice way to compose commands would be a game changer
I think that we need to define built-in should be one shot actions, instead ORM style should be more complex commands with various parameters.
The ORM style requires a Class engine in Amber but for that we can discuss in the other ticket.
we should also add [[ and [ as builtins for use like if [[ ... ]]
we should also add
[[and[as builtins for use likeif [[ ... ]]
I think that the [[ and [ commands are the workaround to Bash. We can implement something that makes more sense than this
The ticket is not yet closed as the topic was to add more builtin commands and there was a PR linked that doesn't involve that.
Oh sorry @Mte90, I mistook it for a different issue
RIght now we are missing:
rmexit
I think that we can add touch too. In this way we have the majority of builtin for our tests.
Maybe @MuhamedMagdi do you want to look on these?
Maybe @MuhamedMagdi do you want to look on these?
I'm currently working on rm implementation, but wanted to know how we would approach this feature #369 before opening a pr.
For that one I think that we have to wait for @Ph0enixKM.