[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Re: Parameter passing to bash aliases



Hi Setia,

It doesn't.

If I say cd /etc/rc.d, it will be expanded as
'cd;ls /etc/rc.d'. It will change to home directory.
I want to cd to whatever directory I specify and list
the contents of that directory.

BTW, it is not possible to do it by shell scripts also.
Only aliasing could be the solution.

Thanks for response,
Raja.


Lokesh Setia wrote:
> 
> alias cd='cd; ls' will do.
> 
> Regards,
> Lokesh Setia,
> <lsetia@xxxxxxxxxxx>
> 
> On Tue, 20 Jul 1999, Rajasankar K wrote:
> 
> > Hello,
> >
> > I have a csh alias "alias cd 'cd \!*;ls'". This will
> > change directory to the one specified in command line
> > as parameter ( through !* ) and list the content of
> > that directory.
> >
> > Anybody know how to do this in bash? Any work-arounds?
> >
> > Thanks
> > Raja.
> >
> > --------------------------------------------------------------------
> > For more information on Linux in India visit http://www.linux-india.org/
> > The Linux India mailing list does not accept postings in HTML format.
> >
> 
> --------------------------------------------------------------------
> For more information on Linux in India visit http://www.linux-india.org/
> The Linux India mailing list does not accept postings in HTML format.

- --------------------------------------------------------------------
For more information on Linux in India visit http://www.linux-india.org/
The Linux India mailing list does not accept postings in HTML format.

------------------------------