you are viewing a single comment's thread
view the rest of the comments
[–] 13 points 1 year ago (15 children)
  • [–] 21 points 1 year ago (5 children)

    CTRL+R [the thing]

    please i beg you

  • source
  • parent
  • hideshow 5 child comments
  • [–] 5 points 1 year ago (4 children)

    with grep I see all the alternatives, Ctl+R just shows me one

  • source
  • parent
  • hideshow 4 child comments
  • [–] 6 points 1 year ago

    For me ctrl-r is faster most of the time, history | grep [command] is better if I can't easily pattern match (don't remember it exactly, using several flag variations, etc.). they're both good tools.

  • source
  • parent
  • [–] 6 points 1 year ago (3 children)

    Ppsshh. Not lazy enough. Create that in a script and call it "hgrep" and drop it into path.

  • source
  • parent
  • hideshow 3 child comments
  • [–] 5 points 1 year ago* (2 children)

    i was doing cat ~/.bash_history | grep thing which is stupid so i started doing grep "thing" ~/.bash_history

    now you're telling me i should do history | grep thing

    i can't win

  • source
  • parent
  • hideshow 2 child comments
  • [–] 7 points 1 year ago (1 child)

    Some would call the former command cat abuse.

    In short, unless you want the contents of a file printed to stdout (or multiple files concatenated), the command can probably be written without cat, instead using the filename as an argument (grep pattern file) or IO redirection (cmd < file).

    Stylistics and readability are another thing though.

  • source
  • parent
  • hideshow 1 child comment