Fish shell, a popular user-friendly command-line shell, has announced version 4.2, a new release that builds on the 4.0 series. Among the most visible improvements is an upgrade to history-based autosuggestions, which now properly handle multi-line commands.

Fish 4.2 also improves how prompts are managed: transient prompts that contain more lines than the final one are now cleared properly, preventing visual clutter on screen. Similarly, the shell now hides parts of a multi-line prompt that have scrolled out of view, eliminating duplicated lines after repainting.

  • platoose@feddit.uk
    link
    fedilink
    English
    arrow-up
    37
    ·
    edit-2
    1 day ago

    it has loads of features that would require extensions or plugins in bash, like autocomplete, abbreviations, or fancy prompts, except they all work out of the box and with minimal configuration and behave intuitively

    fish is also a much nicer language to write scripts in than bash

    totally painless to transition, your bash skills are all transferable

    • Victor@lemmy.world
      link
      fedilink
      arrow-up
      18
      ·
      1 day ago

      fish is also a much nicer language to write scripts in than bash

      I rewrote my entire ~/.local/bin repo of scripts from bash to fish and they are probably 50% shorter on average, actually understandable after not reading them for 6 months so highly maintainable, and actually fun to write in comparison. Argument parsing is also such a breeze.

      I love it. Been using it a few years now and I’ll never use a Bourne style shell again, interactively. Nushell is the only other type of shell I’ve my eyes on, but that seems more useful if I’m in a position where I need to process a lot of data like logs or something.

      • UnfortunateShort@lemmy.world
        link
        fedilink
        English
        arrow-up
        8
        ·
        edit-2
        1 day ago

        At the end of the day, fish is still a language for the shell, hence not necesaarily readable if you don’t pay attention to that kind of thing. The difference is that the special-character count drops by like 80% and it is actually possible to write something readable. Imo this is next to impossible in bash. Also their builtins are pure love. The string command covers pretty much anything you might ever wish to do with any kind of string.

      • chrash0@lemmy.world
        link
        fedilink
        arrow-up
        2
        arrow-down
        1
        ·
        1 day ago

        i made the transition from fish to nushell and can confirm all this stupid JSON data and YAML config was the reason

          • chrash0@lemmy.world
            link
            fedilink
            arrow-up
            1
            ·
            4 hours ago

            it started just dropping in to mess with some data. now it’s my daily driver, and i have a trove of scripts that are my docs as code for systems like systemd or stuff that is specific to work

              • chrash0@lemmy.world
                link
                fedilink
                arrow-up
                1
                ·
                edit-2
                2 hours ago

                nah nushell does all that and more. i think fish is a good alt for someone who knows enough bash to know that scripting it sucks. if you want autocomplete and plugins n stuff it’s probably the most ergonomic POSIX-like shell out there.

    • Scipitie@lemmy.dbzer0.com
      link
      fedilink
      arrow-up
      5
      ·
      1 day ago

      If on he other hand you want a transition that’s really painful and slow but sooo rewarding (highly subjective, of course) you can look into nushell. They just said “screw this 50 years of conceptual baggage and let’s do it data centric and proper”.

      I still am at perhaps 10% the speed of my zsh setup but the concepts are so intriguing I’m sticking to it. At least I try to …