Rubish is an open source UNIX shell written in pure Ruby that parses and compiles shell syntax to Ruby code executed by the Ruby VM. It claims full Bash compatibility while adding deep Ruby integration features: Ruby expressions as conditions, method-call syntax for commands, method chaining as pipelines, iterator blocks for processing command output, inline Ruby evaluation, lambda expressions, Ruby-style function definitions with named parameters, custom Ruby prompts, lazy loading for slow shell initializations, and a restricted mode for untrusted scripts. It also supports zsh-style features. Rubish exposes a public API for embedding in Ruby programs like terminal emulators, with tokenization, parsing, AST access, completion, and custom I/O backends.

7m read timeFrom github.com
Post cover image
Table of contents
ConceptInstallationUsageFeatures beyond BashEmbedding in a Ruby programBuiltinsDevelopmentContributingLicense
992 Impressions