• YTG123@sopuli.xyz
    link
    fedilink
    arrow-up
    5
    ·
    5 小时前

    I’ve never understood the need for fish. The shell experience is basically the same as zsh, and although it’s much more pleasant to script for, you miss out on compatibility with POSIX-compliant snippets, and besides, if you’re writing long and complicated scripts that need anything more than a handful of scalar variables you should probably be using Python (or Perl if you’re an old-school masochist).

  • xxxb@feddit.org
    link
    fedilink
    arrow-up
    3
    ·
    21 小时前

    When I installed freeBSD for the first time, I was so confused when !! didn’t work.

  • Mwa@thelemmy.club
    link
    fedilink
    English
    arrow-up
    22
    ·
    edit-2
    1 天前

    i am using ZSH cause Fish is not POSIX compliant,which made it annoying to run scripts without rewriting them.

      • Mwa@thelemmy.club
        link
        fedilink
        English
        arrow-up
        4
        ·
        edit-2
        1 天前

        how about if its not in a sh file,its common for scripts to use sh or bash instead. but am just gonna stick to ZSH anyways

        • Hawke@lemmy.world
          link
          fedilink
          arrow-up
          17
          ·
          1 天前

          Linux doesn’t generally use extensions to decide what shell to use, so it doesn’t matter if it’s an sh file or not.

          If it uses bash of course you can substitute #!/bin/bash

          And of course you can use whatever shell you want, just saying that POSIX-compliance is not really relevant since the script can specify what shell it needs.

        • trevor (any/all) @lemmy.blahaj.zone
          link
          fedilink
          English
          arrow-up
          10
          ·
          1 天前

          The file extension doesn’t matter much on Linux. If you’ve got a shebang at the top, the shell you’re running from will invoke the correct shell according to the shebang.

          In some situations, you may want to use something like bash <your-script>, but that would only be when you’ve got a script that doesn’t have a shebang, but not having one is bad practice and you really should be using them. Fish isn’t the only non-POSIX shell you’re going to encounter on a Linux system. Python, Perl, and probably some others will be there, and using a shebang ensures no shenanigans. So whether or not you use Fish, you should always use shebangs.

  • inzen@lemmy.world
    link
    fedilink
    arrow-up
    19
    ·
    1 天前

    I use fish because it was the default in cachyos and decided to give it a fair shake. I like the built in syntax highlighting and fancy autocomplete but I miss bash scripting and built in commands that replace standard commands can be weird sometimes. I have not tried scripting fish, to lazy to learn yet another scripting language, especially if bash is the (almost) de-facto standard.

    • lapping6596@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      3 小时前

      I’ve been using it for awhile now for the same reason, and think I’m going to switch back to sh as it has too many suggestions which I read and it interrupts my thoughts and slows me down.

    • prole@lemmy.blahaj.zone
      link
      fedilink
      arrow-up
      2
      ·
      5 小时前

      I like having fish as an option, but don’t think I’d ever use it as my default.

      If I have a long command that uses long filenames, or I don’t remember the syntax of something, I can just type “fish” and it’ll open up a fish shell.

    • ferret@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      16
      ·
      1 天前

      You can always just continue using bash scripting, with a bash shebang in your scripts, if you miss it

          • Hawke@lemmy.world
            link
            fedilink
            arrow-up
            1
            ·
            43 分钟前

            I am the Linux folks.

            FreeIPA is fine, and I don’t care much about the GPO aspect of Active Directory. But the standardization-by-ubiquity that made it easy for everyone to just follow along and make it so it Just Works has been a godsend.

            Yes Microsoft built on the shoulders of giants but trying to make things work with OpenLDAP or the other also-ran directory services was a nightmare.

      • captain_oni@lemmy.blahaj.zone
        link
        fedilink
        English
        arrow-up
        7
        ·
        2 天前

        I remember powershell being extremely slow to start on my laptop and sometimes slow to catch up to my typing (and I’m a slooow typist).

        tbf it was the win 8.1 days, dunno if it’s better now.

        Really liked using it tho. At least it used my actual keyboard layout, unlike cmd.

        • ITGuyLevi@programming.dev
          link
          fedilink
          arrow-up
          1
          ·
          edit-2
          2 小时前

          It’s much better now, I put off moving from cmd until somewhere around 2015 when I was using ‘invoke-command’ constantly, over the last decade or so I’ve moved to powershell proper cmdlets… Its actually not that bad.

    • Overspark@piefed.social
      link
      fedilink
      English
      arrow-up
      21
      ·
      2 天前

      Then give nushell a go. It’s basically a modern implementation of some of the better ideas Powershell had.

    • whoisearth@lemmy.ca
      link
      fedilink
      arrow-up
      2
      ·
      1 天前

      Unironically though. It takes time because it’s structurally different than python but it’s fun when you figure it out

      • Hawke@lemmy.world
        link
        fedilink
        arrow-up
        4
        ·
        1 天前

        Honestly it’s pretty good, but it’s very verbose in its commands and output.

        The default settings are irritating but it takes only minor tweaks to make it tolerable (mainly fixing the tab completion)

        It’s nicely consistent with its object handling.

        As a windows shell it is head and shoulders above cmd.exe. I’ve thought about using it on Linux but there I like fish better.

  • heliotrope@retrofed.com
    link
    fedilink
    English
    arrow-up
    96
    ·
    edit-2
    1 天前

    Thompson shell (predates Bourne)


    scsh (Scheme shell) and closh (Clojure shell)


    sash (stand-alone shell)


    gash (Guile shell)


    ash (Almquist shell)


    dash (Debian Almquist shell)


    eshell (Emacs shell)


    Shells I couldn’t think of images for:

    • bosh (from SchilyTools)
    • tclsh (Tcl shell)
    • ion (from Redox OS)
  • Dagnet@lemmy.world
    link
    fedilink
    English
    arrow-up
    68
    ·
    2 天前

    imo fish is the best out of the box for me, but I just use bash cause its everywhere

    • smiletolerantly
      link
      fedilink
      arrow-up
      52
      ·
      2 天前

      I just wish fish would accept standard bash syntax in addition.

      Like, if you can warn me that “this is not how we set vars in fish, do this instead!” then you could also just, you know, do it.

      • EponymousBosh@feddit.online
        link
        fedilink
        English
        arrow-up
        5
        ·
        edit-2
        19 小时前

        Our last apartment had a microwave that insisted that the off/cancel button was ONLY for the microwave part and NOT the timer part, and if you tried to use it to turn off the timer, would display a message saying “push timer button to turn timer off” (or smth to that effect). I found it infuriating. I told my wife, “if they can program it to sass me, they can program it to turn the damn timer off.”

        Anyway. I get it.

        • smiletolerantly
          link
          fedilink
          arrow-up
          1
          ·
          1 天前

          No, I’m really happy with fish in general and use its syntax. The only times are things like e.g. a coworker sending me a 3-line script and then not being able to just copy, paste, enter.

      • lime!@feddit.nu
        link
        fedilink
        arrow-up
        28
        ·
        2 天前

        yea but the posix sh set syntax is atrocious so not supporting it is doing you a favor

      • nialv7@lemmy.world
        link
        fedilink
        arrow-up
        14
        ·
        edit-2
        2 天前

        I just wish my local restaurant would accept burger orders in addition.

        Like, if you can warn me that “this is a Chinese noodle restaurant, we don’t do burger here. Order one of these instead!” then you could also just, you know, make me a burger!

        • smiletolerantly
          link
          fedilink
          arrow-up
          7
          ·
          1 天前

          That analogy only holds if they cook the burger for you, hold it in front of you, and go “we don’t make this”, then throwing it out

          • nialv7@lemmy.world
            link
            fedilink
            arrow-up
            4
            ·
            1 天前

            No, it’d be like, when you asked them do you know what a burger is? They pointed at a picture of a burger on the wall (they put this picture on the wall because for whatever reason people kept asking them to make burgers), and told you, of course we know what a burger is, we don’t make them, now order noodles or get out!

            • smiletolerantly
              link
              fedilink
              arrow-up
              1
              ·
              1 天前

              Okay, you know what… That’s actually better than what I said. Defeat acknowledged.

              (However, it still seems a bit silly to me. name="value" will prompt you to enter set name "value", with your exact name/value prefilled. As far as I know, it really is just syntax substitution; or am I wrong here? Are there semantic differences that can’t be translated?)

              • nialv7@lemmy.world
                link
                fedilink
                arrow-up
                2
                ·
                1 天前

                i think it could be a slippery slope thing. things like name="value" are easy to parse and implement, but then what if people keep asking for a little bit more, and a little bit more again? bash’s syntax is very very complex, there will be no winners if fish has a half-assed implementation of what bash does, it’s better to not even start.

    • merc@sh.itjust.works
      link
      fedilink
      arrow-up
      18
      ·
      2 天前

      Yeah, that’s where this meme fails. BASH is the default and has been for decades. Most people are not Gigachad.

      I’ll accept FISH as being for babies, Zsh as being for Emo types or extra nerdy people. SH being for white beards makes sense.

      BASH is:

      IT Guy

      • elephantium@lemmy.world
        link
        fedilink
        English
        arrow-up
        5
        ·
        2 天前

        I used a macbook for work for a while with zsh in the terminal. IDK whether I qualify as emo, but I am nerdy. I only think of myself as regular nerdy, though, not extra nerdy.

        • merc@sh.itjust.works
          link
          fedilink
          arrow-up
          1
          ·
          2 天前

          Was zsh the default at the time? Or did you switch to zsh? AFAIK the new default is BASH, but it was zsh for a while.

          IMO, your level of nerdiness is much higher if you change the default shell.

          • elephantium@lemmy.world
            link
            fedilink
            English
            arrow-up
            3
            ·
            1 天前

            I had to go back and check. Apple says that the default changed from bash to zsh in Catalina (10.15). I seem to recall a message coming up on the machine about zsh. I definitely remember poking around at config files and looking at iTerm2 vs. the default terminal app at the time.

            Does that make me extra nerdy? IDK. I can tell you that I was more focused on “What’s going to be comfortable to work with” vs. nerding out on shell differences.

            I do miss homebrew now that I’m working on a Windows laptop.

            • merc@sh.itjust.works
              link
              fedilink
              arrow-up
              1
              ·
              1 天前

              Maybe I remember wrong, but my memory is that at one point MacOS had zsh as the default and then switched to BASH, and then maybe back to zsh again. But, since Internet search is broken these days, I can’t find anything about that.

              • elephantium@lemmy.world
                link
                fedilink
                English
                arrow-up
                1
                ·
                12 小时前

                All I can really tell you is that I remember seeing a message about the new default being zsh, and that was back in 2020 or maybe 2021. So it def switched from something else to zsh, but whether it was bash -> zsh or zsh -> bash -> zsh…shrug

    • Skullgrid@lemmy.world
      link
      fedilink
      arrow-up
      6
      ·
      2 天前

      I’m not learning shit that can’t run on everything.

      Source : I got a fistfull of salesforce certs in order to toe the line in my previous job, and I am currently looking for work.

    • mmmm@sopuli.xyz
      link
      fedilink
      arrow-up
      2
      ·
      2 天前

      I use bash because gentoo’s portage has a hard dependency on it so in my mind it doesn’t make much sense to install and keep yet another shell just because colors and autocompletion. If they ever get rid of the bashisms in portage I’d surely consider moving to fish, but getting rid of the bashisms in portage means that portage could be ported to the BSDs one more time and we could have Gentoo/BSD again

  • obnomus@lemmy.ml
    link
    fedilink
    English
    arrow-up
    14
    ·
    2 天前

    I think I’m using fish and it works great, I love alt+s thing and auto complete thingy.

    • Digit@lemmy.wtf
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 天前

      Huh. Alt+s. I forgot about that. I think maybe something in my tmux config makes it not work. Not to worry, I’ve made use of fish’s abbreviations, and have other nice things, like I type tssr and space, and it types out "time sudo strat -r " for me.

      Well over a decade using fish, and still finding new treats. It’s so cushy out of the box, without even trying to learn it, it’s easy to miss that there’s so much more. I only started using abbr in the past year or so.

    • Laser@feddit.org
      link
      fedilink
      arrow-up
      1
      ·
      2 天前

      I like it (am actually sponsoring) but I’m not sure development is still active. I hope the author finds the time and energy to work on it again it’s someone else picks it up