Date: Wed, 3 Feb 1999 03:37:46 +0100 (MET)
From: Johan Sundström <johsu650@student.liu.se>
Subject: Contributions: various shell functions

Hi!

I've tossed together some quite useful zsh shell functions for use with
licq, doing nice things from the command prompt. You might want to include
them in the distribution; I have a feeling other users might find them
equally useful; zsh users in particular. Just put them somewhere in your
$FPATH, and the shell functions will be a mere command away.

First, some helpful and convenient command-line completions:
compctl -s '$(cut -f2 /tmp/icqaliases)' lt lg lf
compctl -s '$HOME/.licq/conf/<->.uin(:t:r)' lu
compctl -s 'more over last past since month months week weeks hour hours
minute minutes day days one two three four five six seven eight nine ten
eleven twelve thirteen fourteen fifteen sizteen seventeen eighteen
nineteen twenty twentyone twentytwo twentythree twentyfour zero' ll

That first one requires some additional setup in a start script (this is
also necessary for the shellfunctions to work properly):
# Update the /tmp/icqaliases file if it does not exist or is out of date
if [[ ! -f tmp/icqaliases || /tmp/icqaliases -ot $HOME/.licq/conf ]]; then
   egrep '^[aA]lias *= *(.*)$' ~/.licq/conf/*.uin \
       | awk '{sub("^.*licq/conf/", "");sub(".uin:Alias *= *", "\t");print}' \
         > /tmp/icqaliases
fi

That's it, I think! Have fun!
/Johan Sundström
