In the Linux ecosystem, one feature that stands out for its versatility and power is the variety of shells from which users can choose.
Along with the classic Bash and others like Zsh and Tcsh, Fish has been widely recognized and adopted as a go-to choice among many Linux users for its user-friendly approach and advanced features for a long time.
The recently announced Fish 3.7.0 release, with over 1289 commits, strengthens this position, promising enhancements and fixes. Let’s take a look at them.
Fish Shell 3.7.0
Fish 3.7.0 improves command line history management. Now, users can effortlessly find complex command lines with subsequence matches. The history pager also introduces a smarter search feature and a more intuitive way to handle unmatched search queries.
Regarding performance, command completion and globbing see significant speed improvements, especially on slower filesystems like NFS, which is a big win for users dealing with heavy command-line workloads.
Another standout feature in this update is the ability to set a timeout for multi-key sequences, enhancing the usability of features like mode switching in vi mode. At the same time, LS_COLORS will no longer be set automatically, nudging users to embrace more personalized configurations.
Scripting and Command Line Improvements
- Stability and Flexibility: Fish 3.7.0 addresses several bugs and enhances the scripting experience. From fixing crash scenarios to improving the built-in ‘jobs‘ command, the update makes scripting more reliable and versatile.
- Interactive Experience: The update brings notable changes to the interactive experience, like improved history search in vi mode, better working directory reporting in iTerm2, and enhanced selection color configurations.
- Command Completion and Prompt Enhancements: Fish 3.7.0 also introduces a new bind function for history management, improved error messages, and extended support for external commands.
Aesthetic and Usability Tweaks
The default theme now uses named colors, aligning with terminal palettes, and the Dracula theme syncs with upstream changes. Also, prompts display working directories more accurately.
Finally, Fish 3.7.0 adds a plethora of completions for various commands, making life easier for users. The release also sees improvements to manual page completion generators, and other completion tweaks have been made.
Rust: The Road Ahead
The Fish shell is primarily coded in C++. However, this is going to change soon.
David Adam, one of Fish’s lead developers, confirmed that nearly all the C++ code has been successfully transitioned to Rust. This transition added 87,029 lines of Rust code while removing all 76,776 lines of C++ code, marking a 100% rewrite per their latest update.
However, he clarifies that this milestone doesn’t mean the new version of the Fish shell is ready for end-users. The project’s current state is promising, with some performance improvements, but it also faces challenges in certain areas.
Notably, the rewrite has yet to achieve its technical goals, especially concerning thread safety, which was a primary motivation for the transition to Rust.
Additionally, platform support remains a significant hurdle. Short-term support for platforms like Cygwin and MSys2 seems unlikely, and packaging for older Linux distributions presents challenges.
Considering this, the existing third series of Fish will keep using C++ for its coding. But, when it launches its fourth series, it’s expected to make a significant change by shifting its primary programming language to Rust.