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 22:02:31 -0800

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

> > 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.
>
>
>
>
Well, what is your init file?

If your init file is in ~/.emacs.d/init.el, it looks like the act of typing
    alias cl 'cd $* ; ls'
to the eshell prompt will write the filesystem itself, and create or modify
the file ~/.emacs.d/eshell/alias

So that might be bad or that might be good, but it's a permanent change
(unless you edit the alias file): you need only type the characters once
and then forever after the alias is available (unless you explicitly erase
it).

Anyhow, hope you find a suitable solution that addresses the problem the
way you'd like to! :)

dan


reply via email to

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