Qi Xiao, the creator of the Elvish shell, discusses the unique features of his shell implementation written in Go, aimed at improving user experience. He contrasts Elvish with traditional shells like Bash and ZSH, emphasizing its programming-like capabilities. The conversation dives into the challenges of developing a shell, including keyboard event handling and launching external programs. Qi shares insights on the broader impact of command-line interfaces in tech and the evolution of Go within cloud computing.
Building a shell like Elvish requires blending programming language design with user interface considerations to enhance user experience.
The motivation for creating Elvish arose from dissatisfaction with existing shells, highlighting the demand for better operational tools in development workflows.
Elvish introduces advanced features and modern programming paradigms, setting it apart from traditional shells by enhancing interactivity and usability for users.
Deep dives
Understanding the Cloud
The cloud is often perceived as a magical solution for developers, but its operation is grounded in underlying principles that can improve user experience if understood. While public cloud services like AWS and Google Cloud create complex abstractions, the essence of these services stems from traditional server management. For instance, modern cloud functions like AWS Lambda can seem opaque, but they essentially automate the management of virtual machines and resources. A deeper comprehension of these mechanics enables developers to innovate and design better features that leverage the cloud's full potential.
The Experience of Building a Shell
Creating a shell is a unique undertaking that combines aspects of programming language design with user interface considerations, as demonstrated by the co-founder of the Elvish shell. The motivation behind building Elvish stemmed from dissatisfaction with existing shells, which felt limiting and cumbersome for scripting and usability. Over a decade, features were gradually integrated into Elvish, transforming it into a practical tool for daily use—ultimately allowing its creator to adopt it as their default shell. This reflects a broader trend where developers seek tools that not only function effectively but also enhance their operational workflow.
Defining a Shell's Role
A shell serves as both a programming language and an interface to execute commands, distinguishing it from mere terminal applications. Unlike typical terminal programs, a shell is deeply integrated into a user's environment, facilitating not just command execution but direct interaction with the operating system. It functions akin to a graphical interface, allowing users to launch other applications and manage them effectively. Understanding this role can help highlight the shell's significance in day-to-day computing tasks.
Elvish's Unique Features
Elvish sets itself apart from traditional shells through a focus on sensible scripting capabilities and enhanced user interface features. It introduces modern programming paradigms, allowing nested data structures like lists and maps, making it more akin to a full-fledged programming language. Additionally, Elvish incorporates useful UI features such as a built-in file manager and advanced command search capabilities, empowering users with a more interactive experience. These enhancements aim to alleviate frustrations encountered in older shells while providing practical tools for developers.
The Future of Elvish
Looking ahead, Elvish is focused on integrating a new TUI framework that facilitates the development of interactive terminal applications. This evolution aligns with the goal of creating a unified workspace where users can manage both commands and output seamlessly. The vision for Elvish also includes a deeper integration of shell and terminal functionalities, potentially transforming the way users interact with their systems. As the project advances, its developers expect to harness the capabilities of modern programming paradigms to enhance both usability and power.
Writing a shell is rarely the kind of project you take on lightly. In this episode, Johnny is joined by Qi Xiao to explore how to go about such a feat in Go.
Changelog++ members save 9 minutes on this episode because they made the ads disappear. Join today!
Sponsors:
Fly.io – The home of Changelog.com — Deploy your apps close to your users — global Anycast load-balancing, zero-configuration private networking, hardware isolation, and instant WireGuard VPN connections. Push-button deployments that scale to thousands of instances. Check out the speedrun to get started in minutes.
Retool – The low-code platform for developers to build internal tools — Some of the best teams out there trust Retool…Brex, Coinbase, Plaid, Doordash, LegalGenius, Amazon, Allbirds, Peloton, and so many more – the developers at these teams trust Retool as the platform to build their internal tools. Try it free at retool.com/changelog
Timescale – Real-time analytics on Postgres, seriously fast. Over 3 million Timescale databases power loT, sensors, Al, dev tools, crypto, and finance apps — all on Postgres. Postgres, for everything.