Using * when passing argument to alias

I have some folders with this structure:

/data/me/a123xxx

Where "xxx" is some changing series of letters, and "123" changes so folders might look like:

/data/me/a123xxx
/data/me/a234ysd
/data/me/a534sds

etc. The numbers are what matter to me (they identify the folder), so I created an alias:

alias gal 'cd /data/me/a\!*'

So if I type gal 123* it'll bring me into the first folder.

But I'd like to have to just type in gal 123 (and not have the * there). How do I put that * into the alias?

---------- Post updated 06-19-09 at 02:22 PM ---------- Previous update was 06-18-09 at 07:44 PM ----------

That might have been too long, here's a shorter version of my question:

How do I make an alias for a command "gal" so that if I type in:

gal 123

It will be interpreted as:

cd /data/me/a123*

Create a function - not an alias. Put it in your login script.

Thanks! I've never used functions before in UNIX - what would that look like?

---------- Post updated at 06:19 PM ---------- Previous update was at 04:00 PM ----------

Oh, also, I'm using CSH (putting this all in my .cshrc file).... doing some reading it seems like this doesn't support functions? So.... is there any way for me to do what I'm trying to in my .cshrc?

You don't need to use function for csh - argument can be passed to alias in csh. Function is only for bash.

Thanks... so how do I pass the argument to alias in csh? I think since the argument has a * in it (!*), I can't pass an actual * immediately afterward.

alias ee "more /usr/include/asm-generic/errno-base.h | grep $1" -- alias in .cshrc

to use it,
$ ee 11

But don't know if it'll work for your case, which is more complicated.

Thanks! So... what does that do? I tried that in my shell and got "define EAGAIN", "try again", etc.

It is used to find the meaning of some error return code. This example is from linux on tcsh. You can replace the file with one of your own. The idea is that you can pass in any return code to the alias and get the meaning for it.