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

  • SinTan1729@programming.dev
    link
    fedilink
    English
    arrow-up
    1
    ·
    2 days 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.

  • Ephera@lemmy.ml
    link
    fedilink
    English
    arrow-up
    4
    ·
    edit-2
    3 days 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
      2
      ·
      3 days 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.

  • Gamma@programming.dev
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    3 days 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.