TL;DR

Rubish is a Unix shell implemented in pure Ruby that fully supports Bash syntax and features. It allows seamless mixing of shell commands and Ruby code, offering enhanced scripting capabilities. The project is available via Homebrew and GitHub, with ongoing development and community feedback encouraged.

Rubish is a Unix shell written entirely in Ruby that supports full Bash compatibility and deep Ruby integration, enabling users to run existing Bash scripts unmodified and mix Ruby code seamlessly within shell scripts.

Developed by a contributor on GitHub, Rubish parses and compiles Bash syntax into Ruby code, then executes it within the Ruby VM. It supports all Bash features, including scripting, variables, and command chaining, while also allowing Ruby expressions directly in the shell prompt. Installation is available via Homebrew or from source, with options for interactive use, single commands, or as a login shell. Notably, Rubish enables Ruby conditions, method call syntax for commands, and inline Ruby evaluation, making it a powerful tool for developers who want to leverage Ruby’s capabilities in shell scripting. The project emphasizes compatibility, aiming for all Bash scripts to run without modification, and considers any non-working script a bug to be reported.

Why It Matters

This development matters because it combines the scripting flexibility of Bash with Ruby’s programming power, potentially simplifying complex automation tasks. It appeals to developers who prefer Ruby’s syntax and features, offering a unified environment for shell and Ruby scripting. Additionally, Rubish could influence future shell development by demonstrating how deep language integration enhances scripting capabilities, especially in environments where Ruby is already used extensively.

Amazon

Unix shell with Ruby support

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Background

Existing Unix shells like Bash and Zsh have long been standard for scripting and command execution. For more about innovative shell tools, see Zerostack, a Unix-inspired coding agent. Ruby, a popular programming language, is rarely used as a shell but is known for its expressiveness and powerful features. Previous efforts to create Ruby-based shells have existed but lacked full Bash compatibility or deep integration. Rubish aims to fill this gap by providing a shell that is both fully Bash-compatible and deeply integrated with Ruby, enabling existing scripts to run seamlessly while offering advanced scripting features. Its development reflects ongoing interest in more flexible, language-integrated shell environments.

“Rubish supports all features of Bash and allows seamless mixing of Ruby code, making scripting more powerful and flexible.”

— Amatsuda, GitHub contributor

“If any Bash script doesn’t work in Rubish, it is considered a bug, and users are encouraged to report it.”

— Project documentation

Amazon

Bash compatible shell for Ruby developers

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

What Remains Unclear

It is not yet clear how robust Rubish’s compatibility is with complex or less common Bash scripts, or how actively the project is maintained. Community feedback and user reports will determine its maturity and reliability over time.

Amazon

Ruby scripting environment

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

What’s Next

Next steps include broader testing by users, reporting bugs, and potential feature enhancements such as extended shell options or performance improvements. The project team may also work on documentation, tutorials, and integration with other Ruby tools and environments.

Amazon

command line shell with Ruby integration

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Key Questions

Can I run my existing Bash scripts in Rubish without modification?

Yes, Rubish is designed to support all Bash features, so your existing scripts should run unmodified. If any script doesn’t work, it should be reported as a bug.

How do I install Rubish?

You can install Rubish via Homebrew with the command: brew tap amatsuda/rubish && brew install --HEAD rubish. Alternatively, learn more about similar projects at Cybermedia Creations.

What are the advantages of using Rubish over traditional shells?

Rubish combines full Bash compatibility with the ability to embed and execute Ruby code directly in the shell, enabling more powerful scripting, method chaining, and inline Ruby evaluation within shell scripts.

Is Rubish suitable for production use?

As an actively developed project, Rubish is promising but may still have bugs or limitations. Users should evaluate its stability and compatibility before deploying in critical environments.

Source: Hacker News

You May Also Like

Security researcher says Microsoft built a Bitlocker backdoor, releases exploit

A security researcher alleges Microsoft created a backdoor in BitLocker and has published an exploit, raising concerns over encryption security.

Forza Horizon 6 boots up in just 4 seconds instead of 90 with new Advanced Shader Delivery tech and AMD GPUs — Microsoft claims 95% reduction in gaming load times

Microsoft’s Advanced Shader Delivery reduces Forza Horizon 6 load time from 90 seconds to 4 seconds on supported GPUs, marking a major performance breakthrough.

Nullsoft, 1997-2004 AOL kills off the last maverick tech company (2004)

AOL has laid off the remaining Nullsoft staff, effectively shutting down the pioneering software company known for Winamp and Gnutella, in 2004.

A Wayland Compositor in Minecraft

A new Minecraft mod introduces a complete Wayland compositor, enabling Linux users to launch apps and manage windows within the game environment.