- Write and format the code according to the Betty style guide.
- Ensure the code passes all Betty checks.
- Display a prompt and wait for user input.
- Read a command line, ending with a newline character.
- Handle "end of file" condition (Ctrl+D).
- Execute simple commands without arguments.
- Display the prompt after executing a command.
- Handle errors if the executable is not found.
- Modify the shell to handle command lines with arguments.
- Parse and execute commands with provided arguments.
- Display the prompt after executing a command.
- Implement PATH handling to locate executables.
- Check the existence of a command before forking a process.
- Implement the exit built-in command to exit the shell.
- Display an error message if arguments are provided to exit.
- Implement the env built-in command to print the current environment.
- Test the env command in interactive mode.
- Implement a custom getline function.
- Use a buffer to read multiple characters at once.
- Minimize the use of the read system call.
- Use static variables for efficient implementation.
- Implement the shell without using the strtok function.
- Use alternative methods to tokenize input.
- Allow the exit built-in to accept an optional exit status.
- Display an error message if the exit status is not an integer.
- Implement setenv and unsetenv built-in commands.
- setenv initializes or modifies an environment variable.
- unsetenv removes an environment variable.
- Implement the cd built-in command to change the current directory.
- Handle the special case of "cd -" to switch to the previous directory.
- Update the PWD environment variable.
- Implement the command separator (;) to execute multiple commands.
- Implement the && and || logical operators to control command execution.
- Implement the alias built-in command.
- Allow defining, printing, and listing aliases.
- Handle variables replacement in commands.
- Implement
$? and $ $ variable replacements.
- Handle comments in commands (lines starting with #).
- Modify the shell to accept a file as a command line argument.
- Execute commands from the file one line at a time.
- Do not print a prompt or read from stdin in this mode.
====================================== End of Simple Shell Implementation Workflow