Fish Shell 4.1 Released with Brace Syntax, Transient Prompts

Fish shell 4.1 is now available with transient prompts, brace-based commands, smarter autosuggestions, and significant argparse upgrades.

Fish shell, a modern Unix shell designed to be user-friendly and easy to use, has announced version 4.1, a new release that builds on the 4.0 series, delivering new features, scripting improvements, terminal compatibility updates, and some removals of older behavior.

One of the most visible changes is that compound commands can now be written using braces—{ echo 1; echo 2 }—similar to how other shells handle them. Fish also introduces transient prompts. If the fish_transient_prompt variable is set, the prompt is re-rendered right before a command runs, which can help keep things cleaner on the screen.

Moreover, tab completions see an important fix. Instead of breaking somewhere in the middle of a path, completions now truncate at the directory level. For example, completing inside share/functions will display …/foo.fish and …/bar.fish, making it easier to read. Additionally, autosuggestions have become smarter, now supporting multi-line command lines and including suggestions from individual lines in the multi-line history.

On the scripting side, the argparse builtin, a module that facilitates the creation of user-friendly CLIs, has received a long list of improvements. It now supports stricter handling of long options, better control of unknown arguments, multiple optional values, and validation hooks. Other builtins were updated as well: string pad now supports centering, psub can combine --suffix with --fifo, and read gained a --tokenize-raw option.

Regarding interactive usage, pasted commands now automatically strip out leading $ prompts, history search feedback is more targeted, and deleting autosuggestions flashes only the suggestion rather than the whole line.

Key bindings saw adjustments too—on non-macOS platforms, Alt+arrow keys and Alt+delete/backspace now operate on whole arguments instead of punctuation-delimited words. Vi mode has also picked up support for increment and decrement with Ctrl+A and Ctrl+X.

Terminal support has been improved, too, as Fish now supports multiple underline styles—including curly, dotted, and dashed—that can be styled separately from the text color. Plus, mouse support has been expanded with Kitty’s click_events option, allowing cursor movement and pager selection via clicks.

Lastly, there are some notable deprecations. Terminfo-style key names are gone, and Fish no longer reads directly from the terminfo database. Instead, it uses its own key names. Some brace expansion patterns like {echo,echo} are no longer valid either. Additionally, set_color --background=COLOR no longer turns on bold by default, meaning themes relying on that behavior may need to be updated.

For more information, see the changelog.

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.

Leave a Reply

Your email address will not be published. Required fields are marked *