{"id":42493821,"url":"https://github.com/berrym/lush","last_synced_at":"2026-01-28T12:33:22.564Z","repository":{"id":159099748,"uuid":"216701596","full_name":"berrym/lush","owner":"berrym","description":"A Unix shell with developer-first design    ","archived":false,"fork":false,"pushed_at":"2026-01-24T05:02:56.000Z","size":29485,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-01-24T11:58:14.515Z","etag":null,"topics":["bash-extensions","c","c11","comand-line","debugger","line-editor","linux","ployglot-syntax","posix-compatible","shell","terminal","unix","zsh-extensions"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/berrym.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-10-22T01:55:26.000Z","updated_at":"2026-01-24T05:03:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"a2a6e4a3-e5f4-4d76-b5d8-e72c6756c1e1","html_url":"https://github.com/berrym/lush","commit_stats":null,"previous_names":["berrym/lush"],"tags_count":34,"template":false,"template_full_name":null,"purl":"pkg:github/berrym/lush","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/berrym%2Flush","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/berrym%2Flush/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/berrym%2Flush/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/berrym%2Flush/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/berrym","download_url":"https://codeload.github.com/berrym/lush/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/berrym%2Flush/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28845279,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-28T10:53:21.605Z","status":"ssl_error","status_checked_at":"2026-01-28T10:53:20.789Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bash-extensions","c","c11","comand-line","debugger","line-editor","linux","ployglot-syntax","posix-compatible","shell","terminal","unix","zsh-extensions"],"created_at":"2026-01-28T12:33:21.787Z","updated_at":"2026-01-28T12:33:22.556Z","avatar_url":"https://github.com/berrym.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lush\n\n**A Unix shell with developer-first design.**\n\n[![CI](https://github.com/berrym/lush/actions/workflows/ci.yml/badge.svg)](https://github.com/berrym/lush/actions/workflows/ci.yml)\n[![codecov](https://codecov.io/gh/berrym/lush/graph/badge.svg)](https://codecov.io/gh/berrym/lush)\n[![Version](https://img.shields.io/badge/version-1.5.0--prerelease-blue)](https://github.com/berrym/lush/releases)\n[![License](https://img.shields.io/badge/license-MIT-blue)](LICENSE)\n[![C11](https://img.shields.io/badge/standard-C11-blue)](https://github.com/berrym/lush)\n\n---\n\n## What is Lush?\n\nLush is a Unix shell built entirely from scratch. It combines POSIX compliance with carefully chosen extensions from Bash and Zsh, plus capabilities found nowhere else—most notably an integrated debugger for shell scripts. The native line editor (LLE) provides syntax highlighting and context-aware completions without relying on GNU Readline or any external library. Lush is a single binary with zero runtime dependencies.\n\n**Current status:** Under heavy development. Not yet suitable for daily use or production environments. Many features work well; others remain incomplete.\n\n---\n\n## Core Components\n\n### LLE (Lush Line Editor)\n\nA native line editor built specifically for lush:\n\n- Real-time syntax highlighting with 45 token types\n- Context-aware tab completions for all 50 shell builtins\n- Emacs keybindings (44 actions) with kill ring and undo\n- Multi-line editing with automatic continuation\n\nInspired by the line editors in Zsh (ZLE) and Fish.\n\n### Multi-Mode Architecture\n\nRun scripts with different compatibility levels:\n\n```bash\nset -o posix   # Strict POSIX sh compliance\nset -o bash    # Bash compatibility features\nset -o zsh     # Zsh compatibility features  \nset -o lush  # Default mode - curated feature set\n```\n\n### Integrated Debugger\n\nDebug shell scripts interactively - breakpoints, stepping, variable inspection. Not just `set -x` tracing.\n\n```bash\ndebug on                         # Enable debugging\ndebug break add script.sh 15     # Set breakpoint\ndebug vars                       # Inspect variables\ndebug step                       # Step to next line\n```\n\n### Unified Configuration (v1.5.0)\n\nTOML-based configuration with XDG Base Directory compliance:\n\n```toml\n# ~/.config/lush/lushrc.toml\n[shell]\nmode = \"lush\"\n\n[display]\nsyntax_highlighting = true\n\n[history]\nsize = 10000\n```\n\nThe `setopt`/`unsetopt` commands provide Zsh-style option control. A central config registry keeps runtime state and configuration files synchronized.\n\n---\n\n## Extended Syntax\n\nLush implements extended shell features beyond POSIX:\n\n- **Brace expansion** - `{a,b,c}` and `{1..10}` sequence expansion\n- **Arrays** - Indexed arrays with negative index support (`${arr[-1]}`) and append syntax (`arr+=(x y)`)\n- **Associative arrays** - Full support including literal syntax `declare -A map=([key]=value)`\n- **Extended tests** - `[[ ]]` with pattern matching, regex, and file comparison (`-nt`, `-ot`, `-ef`)\n- **Process substitution** - `\u003c(cmd)` and `\u003e(cmd)`\n- **Parameter expansion** - Case modification, substitution, slicing, transformations (`@Q`, `@E`, `@P`, `@a`)\n- **Extended globbing** - `?(pat)`, `*(pat)`, `+(pat)`, `@(pat)`, `!(pat)`\n- **Advanced redirections** - Compound command redirections (`{ cmd; } \u003e file`, `while ...; done \u003c input`)\n- **Hook functions** - `precmd`, `preexec`, `chpwd`, `periodic`\n\n### Context-Aware Error System (v1.5.0)\n\nRust-style error reporting with source locations and suggestions:\n\n```\nerror[E1001]: expected 'THEN', got 'FI'\n  --\u003e script.sh:5:10\n   |\n 5 | if true; fi\n   |          ^~\n   = while: parsing if statement\n   = help: 'if' requires 'then' before 'fi'\n```\n\nCommand-not-found errors include \"did you mean?\" suggestions using Unicode-aware fuzzy matching:\n\n```\nerror[E1101]: gti: command not found\n  --\u003e \u003cstdin\u003e:1:1\n   = help: did you mean 'git', 'gtail', or 'gtr'?\n```\n\n---\n\n## Building\n\n### Requirements\n\n- C11 compiler (GCC 7+ or Clang 5+)\n- Meson build system\n- Ninja\n\n### Build\n\n```bash\ngit clone https://github.com/lush/lush.git\ncd lush\nmeson setup build\nninja -C build\n./build/lush\n```\n\n### Test\n\n```bash\nmeson test -C build\n```\n\n57 tests, zero memory leaks (verified with valgrind).\n\n### Platforms\n\nLinux (primary), macOS, BSD.\n\n---\n\n## Development Status\n\n| Component | Status |\n|-----------|--------|\n| Core shell / POSIX builtins | Working |\n| LLE - Emacs mode | Complete |\n| LLE - Vi mode | Framework only |\n| Extended tests `[[ ]]` | Complete |\n| Brace expansion `{a,b}` `{1..10}` | Complete |\n| Extended globbing `?(pat)` `*(pat)` | Complete |\n| Parameter transformations `@Q` `@P` `@a` | Complete |\n| Negative array indices `${arr[-1]}` | Complete |\n| Shell modes | Working |\n| Debugger | Working |\n| Configuration system | Complete |\n| Context-aware error system | Complete |\n| Associative arrays | Complete |\n| Advanced redirections | Complete |\n| Arithmetic expansion | Complete |\n| User extensibility / plugins | Not yet implemented |\n\nThe shell is functional for many use cases. 82 extended syntax tests pass. Some edge cases remain.\n\n---\n\n## Documentation\n\n- [User Guide](docs/USER_GUIDE.md) - Feature reference\n- [LLE Guide](docs/LLE_GUIDE.md) - Line editor\n- [Config System](docs/CONFIG_SYSTEM.md) - Configuration\n- [Debugger Guide](docs/DEBUGGER_GUIDE.md) - Debugging\n- [Builtin Commands](docs/BUILTIN_COMMANDS.md) - All 50 builtins\n- [Changelog](docs/CHANGELOG.md) - Version history\n\n---\n\n## License\n\nMIT License. See [LICENSE](LICENSE).\n\n---\n\n**Lush** is a real shell, built from scratch, doing things differently.\n\nIt's not finished. But it's not vaporware either - it's 50 builtins, 57 tests, zero leaks, and years of development.\n\nIf you're curious about what a shell could be, lush is worth watching.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fberrym%2Flush","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fberrym%2Flush","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fberrym%2Flush/lists"}