Skip to content
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

Implement "clear" Command for Shell #60

Open
IlanVinograd opened this issue Dec 20, 2024 · 1 comment
Open

Implement "clear" Command for Shell #60

IlanVinograd opened this issue Dec 20, 2024 · 1 comment
Assignees
Labels
good-first-issue Issues to learn codebase

Comments

@IlanVinograd
Copy link
Owner

Good First Issue: Implement "clear" Command for Shell

Objective

Add a new shell command clear that clears the screen and resets the cursor to the top-left corner.

Task Details

  1. Add Command Handling

    • Update the shell input handling logic to recognize the command clear.
  2. Clear Screen Functionality

    • Use the existing clearScreen() function in vga.c to clear the screen content.
    • Reset the cursor position to the starting point using setCursorPosition(2, 0) to ensure the shell prompt is displayed after the header.
  3. Integration

    • Ensure the clear command does not interfere with other shell commands.
    • Test the functionality by executing the clear command in the shell and verifying that the screen is cleared, and the cursor is reset correctly.

Acceptance Criteria

  • Typing clear in the shell should clear the screen and reset the cursor to the prompt position.
  • No impact on other shell functionalities.

Hints

  • Look at the existing handleBackgroundColor() function for reference on how commands are handled in the shell.
  • Use the scroll_screen() function as a fallback if additional modifications are needed to ensure proper cursor placement after clearing.
@IlanVinograd IlanVinograd added the good-first-issue Issues to learn codebase label Dec 20, 2024
@Malone-AI
Copy link

I have implemented "clear" command for shell, can you assign this issue to me? I'll appreciate it if you can assign it to me.I will propose PR after sorting it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good-first-issue Issues to learn codebase
Projects
None yet
Development

No branches or pull requests

2 participants