From: Christopher Dimech <dimech@gmx.com>
To: Dan Hitt <dan.hitt@gmail.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'
Date: Thu, 19 Nov 2020 06:18:33 +0100 [thread overview]
Message-ID: <trinity-54b470be-8e2b-4034-b22b-75b8dac7d5f2-1605763113569@3c-app-mailcom-bs05> (raw)
In-Reply-To: <CAOphizKQs72vz=i1p2Y3=ng8oo4HubSrnHZb7z+uziHrvaFqXA@mail.gmail.com>
> 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.
> > >
> >
> >
>
next prev parent reply other threads:[~2020-11-19 5:18 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-19 2:28 EShell Alias for a 'cd' followed by 'ls' Christopher Dimech
2020-11-19 3:54 ` Stefan Kangas
2020-11-19 4:10 ` Christopher Dimech
2020-11-19 4:43 ` Dan Hitt
2020-11-19 4:56 ` Dan Hitt
2020-11-19 5:18 ` Christopher Dimech [this message]
2020-11-19 6:02 ` Dan Hitt
2020-11-19 6:39 ` Jean Louis
2020-11-19 7:10 ` Christopher Dimech
2020-11-19 8:52 ` Dan Hitt
2020-11-19 12:00 ` Christopher Dimech
2020-11-19 21:19 ` Michael Heerdegen
2020-11-19 4:49 ` Jean Louis
2020-11-19 5:49 ` Christopher Dimech
2020-11-20 2:12 ` Vladimir Sedach
2020-11-20 2:21 ` Christopher Dimech
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=trinity-54b470be-8e2b-4034-b22b-75b8dac7d5f2-1605763113569@3c-app-mailcom-bs05 \
--to=dimech@gmx.com \
--cc=dan.hitt@gmail.com \
--cc=help-gnu-emacs@gnu.org \
--cc=stefan@marxist.se \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).