-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Labels
enhancementNew feature or requestNew feature or requestmoshIssues related to the mosh shell implementationIssues related to the mosh shell implementationreview
Milestone
Description
Goal
Evolve the basic shell implementation in app/mosh (meniOS shell) to become the default userland shell for meniOS with essential bash-like functionality.
Context
Currently, there's a very basic shell implementation in app/mosh that serves as a starting point. As meniOS progresses toward full userland support, we need a functional shell that users can interact with to launch programs, navigate the filesystem, and perform basic system operations.
Definition of Done
- Command parsing: Parse basic command lines with arguments
- Built-in commands: Implement essential built-ins (cd, ls, pwd, exit, help)
- Program execution: Launch userland programs via exec syscalls
- File operations: Basic file manipulation (cat, cp, mv, rm) when filesystem is available
- Environment: Basic environment variable support
- History: Simple command history functionality
- Tab completion: Basic filename/command completion (nice-to-have)
- Error handling: Proper error messages and graceful failure handling
- Prompt customization: Configurable prompt showing current directory
Implementation Details
- Build upon existing code in
app/mosh/ - Keep implementation simple and lightweight for educational OS
- Focus on core functionality rather than advanced features
- Integrate with meniOS syscall interface
- Design for single-user, single-session usage initially
Built-in Commands to Implement
cd [directory]- Change current directoryls [directory]- List directory contentspwd- Print working directorycat <file>- Display file contentsecho <text>- Print text to consolehelp- Show available commandsexit- Exit shellclear- Clear screen
Dependencies
- Syscall interface (write, read, open, close, etc.)
- Filesystem support and VFS layer
- ELF loader for launching programs
- Process management for userland programs
- Basic userland C library functions
Integration Points
- Launch as default shell after kernel boot
- Integrate with userland process lifecycle
- Work with meniOS filesystem when implemented
- Provide platform for testing other userland applications
Future Enhancements
- Job control (background processes)
- Pipes and redirection
- Shell scripting capabilities
- More advanced built-ins
- Configuration files
Files to Work With
app/mosh/- Existing shell implementation- Integration with userland build system
- Documentation for shell usage
Testing Strategy
- Test basic command parsing and execution
- Verify built-in commands work correctly
- Test error handling for invalid commands
- Validate integration with filesystem operations
- Ensure proper cleanup on exit
This shell will serve as the primary user interface for meniOS and provide a platform for testing other userland applications, including eventually launching Doom! 🎮
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestmoshIssues related to the mosh shell implementationIssues related to the mosh shell implementationreview