A feature-rich shell implementation in C that provides various Unix-like shell functionalities including process management, I/O redirection, and custom commands.
- Custom shell prompt showing username, system name, and current directory
- Support for multiple commands using ';' separator
- Background process execution using '&'
- Error handling for invalid commands
hop- Change directory with support for:- Relative and absolute paths
- Special symbols (., .., ~, -)
- Multiple directory arguments
- Displays full path after changing directory
reveal- List files and directories with:- Color coding (green for executables, white for files, blue for directories)
- Support for -a (show hidden files) and -l (detailed listing) flags
- Path symbols support (., .., ~, -)
log- Command history management:- Stores up to 15 most recent commands
- Persists across sessions
log purge- Clear historylog execute <index>- Execute command from history
proclore- Display process information:- PID
- Process Status (R/R+/S/S+/Z)
- Process Group
- Virtual Memory
- Executable Path
seek- Search for files and directories:-dflag for directories only-fflag for files only-eflag for direct interaction with single match- Support for target directory specification
- Background process execution with PID display
- Process completion notification
- Time taken display for foreground processes (>2s)
activities- List all running processesping- Send signals to processesfg/bg- Foreground/Background process control
- Support for input (
<) and output (>,>>) redirection - Multiple pipe (
|) support - Combined pipes and redirection
- Ctrl+C (SIGINT) - Interrupt foreground process
- Ctrl+Z - Stop foreground process
- Ctrl+D - Shell exit
.myshrcsupport for aliases and custom functions- Customizable shell environment
iMan- Fetch man pages from the internet using sockets
# Clone the repository
git clone <repository-url>
# Navigate to the project directory
# Run the makefile
make# Change directory
<username@system:~> hop documents
# List files with details
<username@system:~/documents> reveal -l
# Search for files
<username@system:~> seek -f document ~/
# View command history
<username@system:~> log
# Check process information
<username@system:~> proclore 1234
# Redirect output
<username@system:~> echo "Hello" > output.txt
# Use pipes
<username@system:~> cat file.txt | grep "pattern"
# Fetch man pages
<username@system:~> iMan ls- Invalid command detection and reporting
- File/directory access permission checks
- Process management error handling
- I/O redirection error handling
- Written in C
- Uses system calls for process management
- Socket programming for network features
- Signal handling implementation
- File descriptor management for I/O operations
- Aliases limited to single-word mappings
- Maximum command history of 15 entries
Feel free to submit issues and enhancement requests.