• alias_qr_rainmaker@lemmy.worldOP
    link
    fedilink
    arrow-up
    6
    arrow-down
    3
    ·
    edit-2
    1 day ago

    dude holy shit that is AWESOME! i had something similar, but it was a custom function.

    srch() { cat ~/.bash_history | grep -Ein “$@”}

    • Korthrun@lemmy.sdf.org
      link
      fedilink
      arrow-up
      3
      ·
      edit-2
      21 hours ago

      Did you know that grep can take the name of the file(s) you want it to search as the final arguments?

      For example: grep -Ein "$@" ~/.bash_history