Jan. 18th, 2011

bugid

Jan. 18th, 2011 02:12 pm
marnanel: (Default)
I keep most of my windows maximised, including the browser and the terminal. When I'm testing patches, I often have my browser open at a bug tracker. I like to test patches on a local branch named, say, bug156543, and obviously I also have to mention the bug number in the commit message. But I find it quite tricky to memorise arbitrary six-digit numbers, and it's a nuisance to keep switching windows to see the bug number. And of course it's impossible to automate this process.

Hence this program. It scans the titles of each open window and finds anything called "bug NNN", where NNN is a decimal number. It then prints the number. If there's more than one such, it separates them with spaces. If there are none, it prints none.

If you give it a single argument, it will replace %d wherever it occurs in that string with the relevant bug numbers.

Example of use:

$ git branch `bugid bug%d`

$ git commit -m "Added bouncy castle. Closes `bugid #%d`"


Well, it's useful to me, anyway, so I thought it might be useful to you.
marnanel: (Default)
If I looked on your bed right now, what would I find?
Some pillows, a duvet, and probably Mrs Squirrel.

Do you go to the bathroom with the door open or closed?
How would I go to anywhere with the door closed?

Read more... )

Which is the best Spice Girl?
Stephen Fry.

Do you know what time it is?
No: I have clocks to work that out for me.

Profile

marnanel: (Default)
Monument

January 2022

S M T W T F S
      1
2345678
9101112131415
1617 1819202122
23242526272829
3031     

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 6th, 2025 10:03 am
Powered by Dreamwidth Studios