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: Christopher Dimech
Subject: Re: EShell Alias for a 'cd' followed by 'ls'
Date: Thu, 19 Nov 2020 06:18:33 +0100

> Sent: Thursday, November 19, 2020 at 5:43 AM
> From: "Dan Hitt" <dan.hitt@gmail.com>
> To: "Christopher Dimech" <dimech@gmx.com>
> Cc: "Help Gnu Emacs" <help-gnu-emacs@gnu.org>, "Stefan Kangas" 
> <stefan@marxist.se>
> Subject: Re: EShell Alias for a 'cd' followed by 'ls'
>
> 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 is fine if called within eshell.  However I want the alias be set in my 
emacs
init file.


> 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]