Refactoring Plans
I think it'd be best if we separated builtins from existing modules and placed them into their own builtins
module. No need to have them embedded within existing structures. Perhaps one file per builtin command.
In addition, the Command
structure in the main source file should also go into the builtin
module and perhaps have it's name changed from Command
to Builtin
, as these commands are built in. To do this, the Shell
structure and all of it's methods would have to be separated into it's own shell
module too.
Finally, it's probably best if the builtins are statically generated at compile time, instead of regenerating them each time a command is evaluated.
Refactor Shell/Command Structures
-
Shell -> shell.rs -
Command -> builtin/mod.rs -
Split Flow Control Logic Into Flow Logic Module
Builtins Refactoring Progress
-
alias -
unalias -
let -
drop -
export -
cd -
dirs -
pushd -
popd -
read -
exit -
history -
source -
true -
false -
help