[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to get eshell to do what I used to do with shell
From: |
tpeplt |
Subject: |
Re: How to get eshell to do what I used to do with shell |
Date: |
Sat, 10 Aug 2024 15:10:11 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
"KARR, DAVID" <dk068x@att.com> writes:
> ... I wrote this little wrapper on "shell"
> a couple of decades ago, and it's worked fine since then. I've
> briefly looked at "eshell", and it seems like it will do the job, but
> I wanted to know whether I can wrap it to do the same things my older
> wrapper was doing.
>
> My old wrapper had these features:
> * In a non-shell buffer, execing the main func would either create the
> first shell buffer, or go to the first one in the chain, perhaps
> called the 0th.
> * In a shell buffer, execing the main func would create a new shell in
> the chain, using the current directory
> * In a shell buffer, execing the "goto-next-shell" func would move to
> the next buffer in the chain, or back to 0 if at the end
> * In a shell buffer, execing the "find-shell-with-dir" func would take
> a string argument and find the next buffer in the chain where the pwd
> has that string as a substring
>
> I think all of these are doable, but I haven't written any elisp for
> many years. I see that "default-directory" in each eshell buffer is
> set to the current directory, just like in the old shell package. I
> wonder if this will work just by changing the name of the function to
> execute. Could it be that simple? I guess I'll iterate on that and
> come back here for question.
1. In case you are unaware, there is an Info manual for eshell. It is
separate from the Emacs user manual and the Emacs Lisp reference
manual. If it is installed on your system, then you should be able
to read it by evaluating the following expression in Emacs:
(info "(eshell) Top")
2. One of the chapters in the Eshell manual is titled "Bugs and Ideas".
You might find the answer to your question(s) in this chapter (over
400 lines long), or find that the capability that you want is not yet
supported in Eshell.
(info "(eshell) Bugs and ideas")
--
The lyf so short, the craft so long to lerne.
- Geoffrey Chaucer, The Parliament of Birds.