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.

  • vortic@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    1 month ago

    What benefits does a shell like this have over bash and how hard is it to transition?

    • rarsamx@lemmy.ca
      link
      fedilink
      arrow-up
      1
      ·
      1 month ago

      For me:

      • Better auto complete.
      • Better scripting language
      • Easier to create built in functions
      • Nicer prompt configuration

      There may be some others but I find Bash clumsy (or maybe I’m just clumsy in bash) when I need to use it.

    • tom@jlai.lu
      link
      fedilink
      arrow-up
      0
      ·
      1 month ago

      Fish is great out of the box!

      Check out the Fish for Bash users guide since it explains the main differences.

      The few issues I’ve seen for daily use are that export does not work and you need to use set -x VAR value instead, $PS1 is not recognized because Fish uses its own prompt system, and wildcards work a bit differently…

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

          In fish, man export:

          export is a function included for compatibility with POSIX shells. In general, the set <> builtin should be used instead. When called without arguments, export prints a list of currently-exported variables, like set -x.

          So it’s not really a proper built-in command, but a wrapper around set. But for all intents and purposes… 👍