help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EShell Alias for a 'cd' followed by 'ls'


From: Dan Hitt
Subject: Re: EShell Alias for a 'cd' followed by 'ls'
Date: Wed, 18 Nov 2020 20:43:35 -0800

On Wed, Nov 18, 2020 at 8:11 PM Christopher Dimech <dimech@gmx.com> wrote:

> Have not found it useful.  Have tried the following.
>
> alias cl 'cd $* && ls $*'
>

Actually, it looks like it should be:

alias cl 'cd $* ; ls'

That works for me, and has the very surprising benefit that it propagates
to all shells running in emacs, as well as working in new emacses started
separately from the original one.

So some pretty powerful, heady stuff.

Thanks Stefan for pointing out the path.

dan


>
>
> > Sent: Thursday, November 19, 2020 at 4:54 AM
> > From: "Stefan Kangas" <stefan@marxist.se>
> > To: "Christopher Dimech" <dimech@gmx.com>, "Help Gnu Emacs" <
> help-gnu-emacs@gnu.org>
> > Subject: Re: EShell Alias for a 'cd' followed by 'ls'
> >
> > Christopher Dimech <dimech@gmx.com> writes:
> >
> > > I would like to use Eshell to call an alias 'cl' that does
> > > a 'cd' to a directory followed by an 'ls'.  But I do not know
> > > how to achieve it.
> >
> > I recommend familiarizing yourself with Info, reachable via `C-h i'.
> >
> > You can find the Eshell manual using `m eshell RET' where you should be
> > able to find the information you are looking for using `i alias RET'.
> >
> > Happy to help.
> >
>
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]