Michael McDaniel’s Dawning Awareness

the noise -is- the signal

Archive for February, 2007

Non-zsh-nerds may skip this entry

with 2 comments

Okay, so you use zsh. A lot. And you have lots of places in your filesystem that you use. It’s a lot of work to type the same paths over and over again. What to do? You could make aliases or symlinks. Either of these require a fair amount of premeditation and work up front, which is the last thing you want to do at the time you think of it, which is when you want to change directory to somewhere to get something done!

So I wrote a couple of zsh functions to make it easy as pie. Here’s what you do.

You cd to a directory. You think “that was a lot to type.”
You type “here <name>”, thinking up a short, meaningful name.
Then, the next time you want to go there, you type “use <name>” and boom - you’re there.

This implementation uses symlinks under the covers so your names are persistent across shell sessions (I used to use environment variables, but this is better).

The code follows. Your .zshrc file is where it goes.

[[ -d ~/.use ]] || mkdir ~/.use
function here {

rm -f ~/.use/$1; ln -s `pwd` ~/.use/$1

}
function use {

cd -P ~/.use/$1

}

Written by michael

February 6th, 2007 at 1:04 pm

Posted in Tech

For months, I’ve wanted a default alarm for Treo appointments

with one comment

Finally, I discover that it’s been there, just hidden in awful UI.

Treonauts | Quick Tip: Treo Calendar Alarm:

Looking in the Calendar Preferences I couldn’t find anything and checking the Sound Preferences didn’t seem to be a ‘logical’ place to find it so I didn’t even bother… It was much later and by complete coincidence that I found out that the Sound Preferences is actually the place where I should have looked.

Written by michael

February 5th, 2007 at 8:47 am

Posted in Tech