• SeductiveTortoise@piefed.social
    link
    fedilink
    English
    arrow-up
    0
    ·
    9 days ago

    I had nu on my Windows PC and I thought I could get away with it because I hate PowerShell so much, but then IT came and kicked it into quarantine. Now on zsh-ing on wsl.

    Why didn’t I install nu there? Can’t remember.

  • __Lost__@lemmy.dbzer0.com
    link
    fedilink
    arrow-up
    0
    ·
    9 days ago

    Sometimes I think I’m the only linux user who doesn’t care about their terminal emulator. I use whatever came installed. I assume it’s bash? I don’t know, but anything i want to do is supported by all of them.

    • four@lemmy.zip
      link
      fedilink
      English
      arrow-up
      0
      ·
      9 days ago

      Akchually, those are shells, not terminal emulators.

      Which I guess confirms that you really don’t care. Whatever works for you, works for you :)

      • sem@piefed.blahaj.zone
        link
        fedilink
        English
        arrow-up
        0
        ·
        9 days ago

        What’s the difference.

        How does the virtual terminal factor in.

        Why are some shells not login shells

        What is a terminal these days and why does it mess up keypresses

        • poolcritter@pawb.social
          link
          fedilink
          arrow-up
          0
          ·
          9 days ago

          A terminal emulator (such as xterm, tmux, or emacs) is responsible for displaying a pseudoterminal in a different context (such as an x server, another terminal, or an emacs buffer respectively). Terminals are divided into three types: virtual terminals (on boot or as presented by [C-]A-F<N>), ‘true’ terminals (exposed on serial ports), and pseudoterminals (controlled by other programs). Essentially, you have a virtual terminal running X running Xterm which controls a pseudoterminal with tmux attached controlling another pseudoterminal.

          Login shells are a special flag set when launching shells, sometimes. They typically read different settings (e.g. Bash reads ~/.bash_profile instead of ~/.bashrc). Most shells will launch as a login shell if their command name (argv[0]) begins with a hyphen; Bash also allows explicit bash -l to run a login shell.

        • hamFoilHat@lemmy.world
          link
          fedilink
          arrow-up
          0
          ·
          9 days ago

          The terminal emulator is the window displaying the text. That used to be a physical screen called a terminal. The program that decides what text to show is the shell.

    • Valmond@lemmy.dbzer0.com
      link
      fedilink
      arrow-up
      0
      ·
      9 days ago

      Yesh, I’m a not spending time configuring (and fixing) the shell.

      If I want something hairy I’ll use Python (or even C/C++).

  • inzen@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    9 days ago

    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.

    • ferret@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      0
      ·
      9 days ago

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

      • Gumus@lemmy.dbzer0.com
        link
        fedilink
        arrow-up
        0
        ·
        9 days ago

        That’s what I do. Fish is great as interactive shell, scripts don’t benefit that much from it and I can use what’s familiar.

    • lapping6596@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      8 days ago

      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
      0
      ·
      8 days ago

      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.

  • Mwa@thelemmy.club
    link
    fedilink
    English
    arrow-up
    0
    ·
    9 days ago

    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
        0
        ·
        9 days ago

        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

        • trevor (any/all) @lemmy.blahaj.zone
          link
          fedilink
          English
          arrow-up
          0
          ·
          9 days ago

          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.

        • Hawke@lemmy.world
          link
          fedilink
          arrow-up
          0
          ·
          9 days ago

          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.

    • JackbyDev@programming.dev
      link
      fedilink
      English
      arrow-up
      0
      ·
      8 days ago

      When is this a problem? What scripts don’t use a shebang and/or why does using sh call fish instead of bash or dash?

      I have a mild dislike of fish because a few substitutions are different enough that my muscle memory isn’t there. (But I also haven’t put in serious effort to learn them.)

        • JackbyDev@programming.dev
          link
          fedilink
          English
          arrow-up
          0
          ·
          7 days ago

          Have you run into a specific problem or is this just a hypothetical you’re worried about. I see this a lot but haven’t ever actually run into it being a concern. If you run a script with #!/bin/sh from a Fish shell, it won’t use Fish, it will use whatever you have sh pointing to. (Which shouldn’t be Fish, it’s usually bash or dash.)

          • Mwa@thelemmy.club
            link
            fedilink
            English
            arrow-up
            0
            ·
            7 days ago

            I ran into issues on fish,i don’t remember what they are but I think it’s no shebang

  • muhyb@programming.dev
    link
    fedilink
    arrow-up
    0
    ·
    9 days ago

    Funny story, in my first years of Linux, I always thought ‘sh’ was the only way to run downloaded programs in the terminal. I must have seen it on some forum and learned it that way. Much later I learned that I could just type this ‘./program’ and run them.

    • rumschlumpel@feddit.org
      link
      fedilink
      arrow-up
      0
      ·
      9 days ago

      Much later I learned that I could just type this ./program and run them.

      TBF that does often require that you chmod +x them. Sometimes, that’s not worth the effort …

  • obnomus@lemmy.ml
    link
    fedilink
    English
    arrow-up
    0
    ·
    9 days ago

    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
      0
      ·
      9 days ago

      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.

      • obnomus@lemmy.ml
        link
        fedilink
        English
        arrow-up
        0
        ·
        7 days ago

        I learned that shortcut when someone was talking about shells. I like that I learn new stuff about Linux too.

  • mystic-macaroni@lemmy.ml
    link
    fedilink
    arrow-up
    0
    ·
    9 days ago

    I can’t begin to say how superior my fish rice is to any alternative. So I won’t. And I’ll leave yall to flame me for implying it.

      • festus@lemmy.ca
        link
        fedilink
        English
        arrow-up
        0
        ·
        9 days ago

        Run ‘bash’ and then follow the guide, assuming it’s too complex to tweak for fish.

      • tetris11@feddit.uk
        link
        fedilink
        English
        arrow-up
        0
        ·
        edit-2
        9 days ago

        you can run bash scripts in fish. The syntax is bash ./script.sh

        Edit: I’m being unhelpful/funny. I just read through the fish manual, and it’s so nice and agree that if it was just a bit more bash friendly it would have great uptake