On Sun, Feb 24, 2002 at 05:27:49PM -0800, Dan Robinson wrote:
 > ...
 > I'd like to write "c [directory]" to obey alias c='cd [??] |ls'.
 > What is it that's needed here? Someone (Jason?) showed me it worked
 > anyway, but now I think he left out the [directory] part.
 > ...

Sorry for taking a while to respond.  I'm on digest mode for the mailing 
list.  Anyway, I did unintentionally omitted the directory part of the 
command.  But I recently looked up the man page on bash and it said that 
you can't pass parameters to alias commands.  A function is what's needed 
(as was mentioned in a recent post).  I think the function definition you 
want is:

        function c() { cd "$1" && ls | more }

        Jason Dommasch <[EMAIL PROTECTED]>

Reply via email to