Wednesday 3 July 2013 — This is nearly ten years old. Be careful.
I was working on creating a command today to run Pylint on only the files I had changed:
pylint $(git diff --name-only $(git merge-base HEAD origin/master))
This works pretty well, but I’m not sure it’s ready yet. I want to come back to it, and fiddle with it some. Eventually it might go into a bash alias, but for now, I just want to get it back from history.
Rather than remember some detail from the command, I had an idea to make the command findable again. I could give it a hashtag!
pylint $(git diff --name-only $(git merge-base HEAD origin/master)) #lintdiff
The hash is conveniently a comment character for bash, so I can use any hashtag I like, and later come back to it with ^Rlintdiff.
I’m not sure this is really that useful, since I can make a bash alias right off the bat, but this will let me tweak the command until I like it.
Update: Of course, the right name for this idea is “bashtag”!
I even modified HISTCONTROL parser to make it keep the lines ending in #[a-Z]*
btw, you removed a previous comment from me calling you a genius :P
Add a comment: