logoalt Hacker News

aa-jvtoday at 8:20 AM1 replyview on HN

My favourite shell trick is to comment my code:

  $ some_long_command -with -args -easily -forgotten # thatspecialthing
... Some weeks later ..

  $ CTRL-R<specialthing>
.. finds:

  $ some_long_command -with -args -easily -forgotten # thatspecialthing

Need to see all the special things you've done this week/whenever?

  $ history | grep "\#"
...

Makes for a definite return of sanity ..


Replies

senectus1today at 8:34 AM

omg >$ CTRL-R<specialthing>

I could kiss you.. this alone is amazing!

show 3 replies