🐚 Fortsh - Fortran Shell

A modern Unix shell implementation in Fortran 2018 with advanced features

v3.3.0

🚀 Features

🌳 AST-Based Parsing

Modern compiler design with lexer, parser, and AST evaluator for improved accuracy

✅ Full Builtin Compliance

Complete implementation of shell builtins including which, type, and directory commands

📜 Advanced Scripting

Loops, functions, local variables, advanced testing [[ ]], and complete POSIX compliance

⚙️ Signal Handling

Proper signal handling for external commands with execvp model for path execution

🔍 Pattern Matching

Glob patterns, brace expansion, and comprehensive pathname expansion

📊 Performance

Optimized release builds, memory management, and efficient execution

📦 Installation

🐧 Linux (DNF/YUM)
📦 Direct RPM
🍺 Homebrew (macOS)
📦 AUR (Arch)
⚙️ Build from Source

YUM/DNF Repository (Recommended for RHEL/Fedora)

# Add repository
sudo wget -O /etc/yum.repos.d/fortsh.repo https://repos.musicsian.com/fortsh.repo

# Install fortsh
sudo dnf install fortsh

🎯 Usage Examples

# Basic shell usage
fortsh

# Performance monitoring
export FORTSH_PERF=1
fortsh

# Advanced scripting
for file in *.txt; do
  echo "Processing: $file"
done

# Job control
command &          # Run in background
jobs              # List jobs
fg %1             # Bring to foreground

# Pattern matching
echo *.{txt,log}  # Glob expansion
echo test-[0-9]*  # Character classes

⚡ Performance Features

# Enable performance monitoring
perf on

# View memory usage
memory

# Built-in commands provide runtime stats
# - Parse time: ~0.009ms average
# - Execution time: ~0.115ms average  
# - Memory pools for optimization
# - Automatic memory optimization

📋 Requirements

🔗 Links

📝 License

MIT License - Free and open source