![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
On the one hand, interrupt-driven work processes are the bane of all programmers' existence. It means that you can't go head-down into the code and live with it for a couple of hours because, frankly, work is not going to let you. There are meetings. There are QA people who want answers now. There are inopportune revels in the hallways-- just kidding. But if you work in a cubicle, you know the drill.
Still, there are things that take time, such as builds and checkouts, and those are an excuse to go surf. For me, it's always been a pain to know when a job was done, to keep switching back and forth from, oh, Usenet to the console where I was doing real work, to see if the current task was complete.
Probably the most useful program I've found for doing "interrupts of interrupts" is xmessage, or its Gnome equivalent, gxmessage, which when tacked to the end of some long-running non-daemon process, will pop up a window on your X console when you're done. I use gxmessage, and have an alias called bgxmessage, which looks like this: gxmessage -font "sans 28" -fg white -bg "#446a7e". Gives me a popup with nice colors and big, unmistakeable letters.
Now you know when to go back to work. It's possible to put other things into bgxmessage like timestamps and so forth, if you know your console.
The other tool I use a lot is 'history', which allows you to repeat commands easily. I do this a lot when doing a lot of searching and organizing, and I've aliased my history command down to "h". I recently added another tool: "hg", which looks like this: history | grep. As commands go, it's incomplete, but it has great utility. If you're like me and your history is deep, a thousand entries or more, this allows you to type things like hg Tools, which means "find me every recent command were I referenced something called Tools", which is usually a directory. Or hg rsync, which means "find me every command I've issued recently where I used rsync."
Still, there are things that take time, such as builds and checkouts, and those are an excuse to go surf. For me, it's always been a pain to know when a job was done, to keep switching back and forth from, oh, Usenet to the console where I was doing real work, to see if the current task was complete.
Probably the most useful program I've found for doing "interrupts of interrupts" is xmessage, or its Gnome equivalent, gxmessage, which when tacked to the end of some long-running non-daemon process, will pop up a window on your X console when you're done. I use gxmessage, and have an alias called bgxmessage, which looks like this: gxmessage -font "sans 28" -fg white -bg "#446a7e". Gives me a popup with nice colors and big, unmistakeable letters.
Now you know when to go back to work. It's possible to put other things into bgxmessage like timestamps and so forth, if you know your console.
The other tool I use a lot is 'history', which allows you to repeat commands easily. I do this a lot when doing a lot of searching and organizing, and I've aliased my history command down to "h". I recently added another tool: "hg", which looks like this: history | grep. As commands go, it's incomplete, but it has great utility. If you're like me and your history is deep, a thousand entries or more, this allows you to type things like hg Tools, which means "find me every recent command were I referenced something called Tools", which is usually a directory. Or hg rsync, which means "find me every command I've issued recently where I used rsync."
no subject
Date: 2005-08-15 06:50 pm (UTC)Already found two other useful progs in the gnu library.
Enjoyed the camping/hiking stories, as well.
no subject
Date: 2005-08-15 09:03 pm (UTC)All these years, and I never once noticed "xmessage". D'Oh!
As for _my_ favorites...
1. If you use "bash," you can reverse-search through the command history using followed by the first few letters of the thing you're searching for. Then just keep hitting to cycle through everything that matches.
2. Curlies!
Curlies are in the shells: csh, tcsh, and bash (dunno about ksh). They are comma-delimited lists which preserves any prefix or suffix on either curly brace, expanding to a space-separated list. Example:
less /some/log/path/mat{ress,tilda,h,er}.log
...expands to:
less /some/log/path/matress.log /some/log/path/mattilda.log /some/log/path/math.log/some /log/path/mater.log
Before I discovered curlies, I used to "hand-construct" such lists using a for-loop and a shell variable. Curlies are less work. :)
no subject
Date: 2005-08-15 10:09 pm (UTC)I kinda like the reverse history, but it's not always what I wanted, hence the hg construct to find what I was looking for. I often have hundreds of calls that start with the same thing, but end differently, and it's often the endings (or some middle part, the thing I'm transferring or transcoding or whatever) that needs finding.
no subject
Date: 2005-08-16 01:26 am (UTC)