Didn’t know about auto populating search queries, abbreviations, string scripting, and using private mode.

  • Ephera@lemmy.ml
    link
    fedilink
    English
    arrow-up
    11
    ·
    edit-2
    1 month ago

    I wish that string command and also their math command were just general-purpose utilities pre-installed on all systems.

    Tried to script something with sed the other day and was so confused why my regexes weren’t matching, until we realized you need to pass --regexp-extended to get modern-day regex.

    And then I later tried to calculate an average, which bc decided to round down, because it was presumably doing integer math. I actually ended up running python -c "print($total / $count)", because I could not be arsed to work out, if there was some flag to make bc work properly.

    I’m fine with these tools continuing to exist for legacy purposes, but I would like a modern replacement just about now.

    • Gamma@programming.dev
      link
      fedilink
      English
      arrow-up
      4
      ·
      1 month ago

      string split/collect and similar can’t work unless its a builtin. The set foo ( ...... | string ... ) pattern couldn’t work if string was an external binary.

  • Fizz@lemmy.nz
    link
    fedilink
    arrow-up
    10
    ·
    1 month ago

    I’m worried that I’ll get used to the quality of.life improvements and then I’ll make a dumb mistake using bash at work.

  • Gamma@programming.dev
    link
    fedilink
    English
    arrow-up
    6
    ·
    edit-2
    1 month ago

    Scrubbing through the video, this hurts my soul

    echo $(echo $STRING | sed 's/World/Bash/')
    

    For variables bash has PE forms:

    echo ${STRING/World/Bash}
    

    I miss these too much when I try Fish.

    • Gamma@programming.dev
      link
      fedilink
      English
      arrow-up
      6
      ·
      1 month ago

      I get annoyed by differences with (Ba|Z)sh when I try Fish, but nushell is so much its own thing that it’s fun.

    • rozodru@social.vivaldi.net
      link
      fedilink
      arrow-up
      7
      arrow-down
      1
      ·
      1 month ago

      @HappyFrog @ruffsl you’re not insane. I think you’re a person that knows what they like and knows what works for them which is the beauty of Linux.

      Also I’ve never heard of nushell and now you’ve made me want to check it out!

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

      I’m glad you mentioned nushell (it sounds like) is a more poweruser thing. Someone recommended it in place of fish in another thread and I was curious to check it out, but it sounds like not at all what I want or need as a fish user and that saves me the trouble of trying to make heads or tails of a terminal tool I don’t understand

      But it looks like a cool project and I’m glad it exists for people like you! 😊

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

      I wouldn’t use Nushell as my main shell, but I love using it for data manipulation. It’s incredible for that <3

      afaik it’s way more versatile than using jq.

  • SinTan1729@programming.dev
    link
    fedilink
    English
    arrow-up
    3
    ·
    1 month ago

    It’s perfect for daily interactive use, but terrible for scripting. I write almost all my scripts in bash, the only exceptions being convenience scripts for fish itself.

    • traceur301@lemmy.blahaj.zone
      link
      fedilink
      English
      arrow-up
      3
      arrow-down
      1
      ·
      1 month ago

      I still work with bash scripts from fish (to interoperate with bash users), but it’s more like how I use python: the interpreter is specified either in the shebang or explicitly on the cli command invoking the script. It works quite well actually

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

    I had to switch from fish to bash because one command to install S.T.A.L.K.E.R. - G.A.M.M.A only works in bash. I have no further details on why 🤷