* In eshell, how to translate aliases that "eval" output from scripts
@ 2024-08-10 21:16 KARR, DAVID
2024-08-10 22:26 ` tpeplt
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: KARR, DAVID @ 2024-08-10 21:16 UTC (permalink / raw)
To: Help-gnu-emacs@gnu.org
In my bash config, I have aliases whose value is like ". scriptname". These execute "scriptname", which is in the path, the output of which are "export" and other shell commands. This is a way of having a shell command implicitly set environment variables that are used by later command invocations. What's the proper way to translate this to eshell?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: In eshell, how to translate aliases that "eval" output from scripts
2024-08-10 21:16 In eshell, how to translate aliases that "eval" output from scripts KARR, DAVID
@ 2024-08-10 22:26 ` tpeplt
2024-08-11 6:53 ` KARR, DAVID
2024-08-11 11:31 ` Joel Reicher
2024-08-14 2:15 ` James Thomas
2 siblings, 1 reply; 7+ messages in thread
From: tpeplt @ 2024-08-10 22:26 UTC (permalink / raw)
To: KARR, DAVID; +Cc: Help-gnu-emacs@gnu.org
"KARR, DAVID" <dk068x@att.com> writes:
> In my bash config, I have aliases whose value is like ". scriptname".
> These execute "scriptname", which is in the path, the output of which
> are "export" and other shell commands. This is a way of having a
> shell command implicitly set environment variables that are used by
> later command invocations. What's the proper way to translate this to
> eshell?
See:
(info "(eshell) Built-ins")
and
(info "(eshell) Aliases")
--
The lyf so short, the craft so long to lerne.
- Geoffrey Chaucer, The Parliament of Birds.
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: In eshell, how to translate aliases that "eval" output from scripts
2024-08-10 22:26 ` tpeplt
@ 2024-08-11 6:53 ` KARR, DAVID
0 siblings, 0 replies; 7+ messages in thread
From: KARR, DAVID @ 2024-08-11 6:53 UTC (permalink / raw)
To: tpeplt; +Cc: Help-gnu-emacs@gnu.org
Yes, I saw the part about defining aliases. That is the trivial part of this question.
From: tpeplt <tpeplt@gmail.com>
Sent: Saturday, August 10, 2024 3:26 PM
To: KARR, DAVID <dk068x@att.com>
Cc: Help-gnu-emacs@gnu.org
Subject: Re: In eshell, how to translate aliases that "eval" output from scripts
"KARR, DAVID" <dk068x@ att. com> writes: > In my bash config, I have aliases whose value is like ". scriptname". > These execute "scriptname", which is in the path, the output of which > are "export" and other shell commands. This
"KARR, DAVID" <dk068x@att.com<mailto:dk068x@att.com>> writes:
> In my bash config, I have aliases whose value is like ". scriptname".
> These execute "scriptname", which is in the path, the output of which
> are "export" and other shell commands. This is a way of having a
> shell command implicitly set environment variables that are used by
> later command invocations. What's the proper way to translate this to
> eshell?
See:
(info "(eshell) Built-ins")
and
(info "(eshell) Aliases")
--
The lyf so short, the craft so long to lerne.
- Geoffrey Chaucer, The Parliament of Birds.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: In eshell, how to translate aliases that "eval" output from scripts
2024-08-10 21:16 In eshell, how to translate aliases that "eval" output from scripts KARR, DAVID
2024-08-10 22:26 ` tpeplt
@ 2024-08-11 11:31 ` Joel Reicher
2024-08-11 23:48 ` Joel Reicher
2024-08-14 2:15 ` James Thomas
2 siblings, 1 reply; 7+ messages in thread
From: Joel Reicher @ 2024-08-11 11:31 UTC (permalink / raw)
To: KARR, DAVID; +Cc: Help-gnu-emacs@gnu.org
"KARR, DAVID" <dk068x@att.com> writes:
> In my bash config, I have aliases whose value is like
> ". scriptname". These execute "scriptname", which is in the
> path, the output of which are "export" and other shell commands.
> This is a way of having a shell command implicitly set
> environment variables that are used by later command
> invocations. What's the proper way to translate this to eshell?
If I've understood you correctly, you will need to re-implement
the scripts/aliases in lisp.
I think you are saying your scripts are sourced rather than
executed as child processes, and mutate the shell's environment
(by setting environment variables).
Eshell is a lisp environment, and a subprocess can't mutate it for
the same reason a subprocess can't mutate a bash environment, so
you will need to be calling lisp functions from it to achieve
those mutations.
Cheers,
- Joel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: In eshell, how to translate aliases that "eval" output from scripts
2024-08-11 11:31 ` Joel Reicher
@ 2024-08-11 23:48 ` Joel Reicher
0 siblings, 0 replies; 7+ messages in thread
From: Joel Reicher @ 2024-08-11 23:48 UTC (permalink / raw)
To: KARR, DAVID; +Cc: Help-gnu-emacs@gnu.org
Joel Reicher <joel.reicher@gmail.com> writes:
> "KARR, DAVID" <dk068x@att.com> writes:
>
>> In my bash config, I have aliases whose value is like
>> ". scriptname". These execute "scriptname", which is in the
>> path, the output of which are "export" and other shell
>> commands. This is a way of having a shell command implicitly
>> set environment variables that are used by later command
>> invocations. What's the proper way to translate this to
>> eshell?
>
> If I've understood you correctly, you will need to re-implement
> the scripts/aliases in lisp.
Oh, I should perhaps also mention that eshell has the notion of an
eshell script, which you might prefer to "native" lisp.
(info "(eshell) Scripts")
Cheers,
- Joel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: In eshell, how to translate aliases that "eval" output from scripts
2024-08-10 21:16 In eshell, how to translate aliases that "eval" output from scripts KARR, DAVID
2024-08-10 22:26 ` tpeplt
2024-08-11 11:31 ` Joel Reicher
@ 2024-08-14 2:15 ` James Thomas
2024-08-14 11:00 ` Joel Reicher
2 siblings, 1 reply; 7+ messages in thread
From: James Thomas @ 2024-08-14 2:15 UTC (permalink / raw)
To: KARR, DAVID; +Cc: Help-gnu-emacs@gnu.org
KARR, DAVID wrote:
> In my bash config, I have aliases whose value is like ". scriptname".
> These execute "scriptname", which is in the path, the output of which
> are "export" and other shell commands. This is a way of having a shell
> command implicitly set environment variables that are used by later
> command invocations. What's the proper way to translate this to
> eshell?
(info "(eshell) Scripts") defines the '.', (info "(eshell) List of
Built-ins") defines 'export', and then, of course, there's (info
"(eshell) Aliases"). No translation should be necessary, isn't it?
--
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: In eshell, how to translate aliases that "eval" output from scripts
2024-08-14 2:15 ` James Thomas
@ 2024-08-14 11:00 ` Joel Reicher
0 siblings, 0 replies; 7+ messages in thread
From: Joel Reicher @ 2024-08-14 11:00 UTC (permalink / raw)
To: James Thomas; +Cc: KARR, DAVID, Help-gnu-emacs@gnu.org
James Thomas <jimjoe@gmx.net> writes:
> KARR, DAVID wrote:
>
>> In my bash config, I have aliases whose value is like
>> ". scriptname". These execute "scriptname", which is in the
>> path, the output of which are "export" and other shell
>> commands. This is a way of having a shell command implicitly
>> set environment variables that are used by later command
>> invocations. What's the proper way to translate this to eshell?
>
> (info "(eshell) Scripts") defines the '.', (info "(eshell) List
> of Built-ins") defines 'export', and then, of course, there's
> (info "(eshell) Aliases"). No translation should be necessary,
> isn't it?
It's possible the translation won't require altering any text, but
I'm fairly sure it still needs running the script in the eshell
interpreter to modify the eshell environment.
Cheers,
- Joel
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2024-08-14 11:00 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-10 21:16 In eshell, how to translate aliases that "eval" output from scripts KARR, DAVID
2024-08-10 22:26 ` tpeplt
2024-08-11 6:53 ` KARR, DAVID
2024-08-11 11:31 ` Joel Reicher
2024-08-11 23:48 ` Joel Reicher
2024-08-14 2:15 ` James Thomas
2024-08-14 11:00 ` Joel Reicher
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.