• Skyler@kbin.social
    link
    fedilink
    arrow-up
    3
    ·
    1 year ago

    This is my approach, and for those who don’t know, you can use those line numbers that come back from history to rerun the command. Like if your output is something like this:

    $ history | grep tmp
      501  ls /tmp
      502  history | grep tmp
    
    

    You can run !501 and it will just re-run ls /tmp