[wellylug] Take a hint
Grant McLean
grant at mclean.net.nz
Mon Sep 6 21:36:44 NZST 2004
I've devised a very simple memory aid that has been proving
useful, so I thought I'd share it here. The concept is a file
full of one-line 'hints' and an alias for grepping from it.
For example, if I want to refresh the keys in my GPG keyring,
I type:
hint refresh
and get this in response:
gpg refresh keys:
gpg --keyserver pgp.mit.edu --refresh-keys
Then I cut and paste the command (triple left click + middle click)
to run it.
For a bit of background, I have put my 'dot files' into a CVS
project. I check the project out into ~/.common_configs on each
host where I want my familiar aliases etc. The project includes
an 'install' script which I run to symlink the relevant files
into my home directory.
My .bashrc includes this function definition to implement the
'hint' command:
function hint() {
test -n "$*" && sed -n "/$*/Is/^\([^:]*:\) *\(.*\)$/\1\n\2\n/p"
~/.common-configs/hints
}
and this alias for editing the hints file:
alias vihints='vi ~/.common-configs/hints'
and this is what's in the hints file right now (including a few
extra newlines which my mailer has thrown in for free):
cvs import: cvs -d ":ext:grant at my.cvs.server/cvs" import -m "comment"
modname grant start
cvs checkout: cvs -d ":ext:grant at my.cvs.server/cvs" co -d
.common_configs grant/configs
cvs fix comment: cvs admin -m 1.12:"replacement commit message here"
cvs create branch: cvs tag -b branch-name
Debian which package owns a file: dpkg -S file
Debian list all files in package: dpkg -L package
gpg refresh keys: gpg --keyserver pgp.mit.edu --refresh-keys
gpg download a key: gpg --keyserver pgp.mit.edu --recv-key 0xDEADBEEF
gpg upload a key: gpg --keyserver pgp.mit.edu --send-key 0xDEADBEEF
deb new upstream release:uupdate -u sshmenu-applet-2.03.tar.gz (from in
old build dir)
Perl build into private lib dir:perl Makefile.PL LIB=~/perl/lib
Perl coverage report:cover -delete; HARNESS_PERL_SWITCHES=-MDevel::Cover
make test; cover
add image border:convert -border 1x1 -bordercolor black infile outfile
back up palm:pilot-xfer -p /dev/ttyUSB1 --backup .
Cheers
Grant
More information about the wellylug
mailing list