Fish Shell 3.7.0: Staying C++ While Ushering Improvements

Fish Shell 3.7.0 improves history pager, performance, and scripting. Future 4.x releases will transition Fish internals to Rust.

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 Shell 3.7.0

Main Highlights

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.

Bobby Borisov

Bobby Borisov

Bobby, an editor-in-chief at Linuxiac, is a Linux professional with over 20 years of experience. With a strong focus on Linux and open-source software, he has worked as a Senior Linux System Administrator, Software Developer, and DevOps Engineer for small and large multinational companies.

Think You're an Ubuntu Expert? Let's Find Out!

Put your knowledge to the test in our lightning-fast Ubuntu quiz!
Ten questions to challenge yourself to see if you're a Linux legend or just a penguin in the making.

1 / 10

Ubuntu is an ancient African word that means:

2 / 10

Who is the Ubuntu's founder?

3 / 10

What year was the first official Ubuntu release?

4 / 10

What does the Ubuntu logo symbolize?

5 / 10

What package format does Ubuntu use for installing software?

6 / 10

When are Ubuntu's LTS versions released?

7 / 10

What is Unity?

8 / 10

What are Ubuntu versions named after?

9 / 10

What's Ubuntu Core?

10 / 10

Which Ubuntu version is Snap introduced?

The average score is 68%