* Is there REPL for Bash?
@ 2024-12-27 9:26 Jean Louis
2024-12-27 14:17 ` Joel Reicher
2024-12-27 14:36 ` Eduardo Ochs
0 siblings, 2 replies; 9+ messages in thread
From: Jean Louis @ 2024-12-27 9:26 UTC (permalink / raw)
To: Help GNU Emacs
I wonder if there is some REPL for Bash, so that I can write and
evaluate shell script and see it evaluated in the side window?
Jean Louis
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Is there REPL for Bash?
2024-12-27 9:26 Is there REPL for Bash? Jean Louis
@ 2024-12-27 14:17 ` Joel Reicher
2024-12-27 16:14 ` Jean Louis
2024-12-27 14:36 ` Eduardo Ochs
1 sibling, 1 reply; 9+ messages in thread
From: Joel Reicher @ 2024-12-27 14:17 UTC (permalink / raw)
To: Jean Louis; +Cc: Help GNU Emacs
Jean Louis <bugs@gnu.support> writes:
> I wonder if there is some REPL for Bash, so that I can write and
> evaluate shell script and see it evaluated in the side window?
Bash itself is the REPL for bash.
If you'd like to run it from Emacs, (info "(emacs) Interactive
Shell") is probably the way.
Regards,
- Joel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Is there REPL for Bash?
2024-12-27 14:17 ` Joel Reicher
@ 2024-12-27 16:14 ` Jean Louis
2024-12-27 21:05 ` Joel Reicher
0 siblings, 1 reply; 9+ messages in thread
From: Jean Louis @ 2024-12-27 16:14 UTC (permalink / raw)
To: Joel Reicher; +Cc: Help GNU Emacs
* Joel Reicher <joel.reicher@gmail.com> [2024-12-27 17:18]:
> Jean Louis <bugs@gnu.support> writes:
>
> > I wonder if there is some REPL for Bash, so that I can write and
> > evaluate shell script and see it evaluated in the side window?
>
> Bash itself is the REPL for bash.
Sure, I was thinking I could edit a file in one buffer and easily
evaluate it in a new shell related to that buffer and file, watching
it on the side. 💡📝💻🔍
--
Jean Louis
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Is there REPL for Bash?
2024-12-27 16:14 ` Jean Louis
@ 2024-12-27 21:05 ` Joel Reicher
2024-12-28 7:19 ` tomas
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Joel Reicher @ 2024-12-27 21:05 UTC (permalink / raw)
To: Help GNU Emacs
Jean Louis <bugs@gnu.support> writes:
> * Joel Reicher <joel.reicher@gmail.com> [2024-12-27 17:18]:
>> Jean Louis <bugs@gnu.support> writes:
>>
>>> I wonder if there is some REPL for Bash, so that I can write
>>> and evaluate shell script and see it evaluated in the side
>>> window?
>>
>> Bash itself is the REPL for bash.
>
> Sure, I was thinking I could edit a file in one buffer and
> easily evaluate it in a new shell related to that buffer and
> file, watching it on the side. 💡📝💻🔍
If you're editing foo.sh You could do M-x compile and enter
something like "bash foo.sh" for the compilation. That will
achieve this effect as long as the script does not require
interactive input.
But this is not what a REPL is, so I'm a bit confused why you say
you want a REPL (and also don't want to use the one that already
exists).
Regards,
- Joel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Is there REPL for Bash?
2024-12-27 21:05 ` Joel Reicher
@ 2024-12-28 7:19 ` tomas
2024-12-28 13:28 ` Jean Louis
2024-12-28 13:47 ` Jean Louis
2 siblings, 0 replies; 9+ messages in thread
From: tomas @ 2024-12-28 7:19 UTC (permalink / raw)
To: help-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 1179 bytes --]
On Sat, Dec 28, 2024 at 08:05:29AM +1100, Joel Reicher wrote:
> Jean Louis <bugs@gnu.support> writes:
>
> > * Joel Reicher <joel.reicher@gmail.com> [2024-12-27 17:18]:
> > > Jean Louis <bugs@gnu.support> writes:
> > >
> > > > I wonder if there is some REPL for Bash, so that I can write and
> > > > evaluate shell script and see it evaluated in the side window?
> > >
> > > Bash itself is the REPL for bash.
> >
> > Sure, I was thinking I could edit a file in one buffer and easily
> > evaluate it in a new shell related to that buffer and file, watching it
> > on the side. 💡📝💻🔍
>
> If you're editing foo.sh You could do M-x compile and enter something like
> "bash foo.sh" for the compilation. That will achieve this effect as long as
> the script does not require interactive input.
>
> But this is not what a REPL is, so I'm a bit confused why you say you want a
> REPL (and also don't want to use the one that already exists).
I think the OP has been using REPL in some extension of the original sense.
Strictly speaking, the bash /is/ primarily a REPL (read-evaluate-print loop).
All shells were born for that.
Cheers
--
t
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Is there REPL for Bash?
2024-12-27 21:05 ` Joel Reicher
2024-12-28 7:19 ` tomas
@ 2024-12-28 13:28 ` Jean Louis
2024-12-28 13:47 ` Jean Louis
2 siblings, 0 replies; 9+ messages in thread
From: Jean Louis @ 2024-12-28 13:28 UTC (permalink / raw)
To: Joel Reicher; +Cc: Help GNU Emacs
* Joel Reicher <joel.reicher@gmail.com> [2024-12-28 00:07]:
> Jean Louis <bugs@gnu.support> writes:
>
> > * Joel Reicher <joel.reicher@gmail.com> [2024-12-27 17:18]:
> > > Jean Louis <bugs@gnu.support> writes:
> > >
> > > > I wonder if there is some REPL for Bash, so that I can write and
> > > > evaluate shell script and see it evaluated in the side window?
> > >
> > > Bash itself is the REPL for bash.
> >
> > Sure, I was thinking I could edit a file in one buffer and easily
> > evaluate it in a new shell related to that buffer and file, watching it
> > on the side. 💡📝💻🔍
>
> If you're editing foo.sh You could do M-x compile and enter something like
> "bash foo.sh" for the compilation. That will achieve this effect as long as
> the script does not require interactive input.
I mean executing commands one by one. There is SQL mode, I can edit
file and then send the paragraphs to the SQL buffer and see the
result.
In shell-script-mode I can evaluate region, but I do not see where is
it evaluated.
My expectation was that it would work as SQL, and I didn't know how it
works. It's not that I do not want to use what is available, I was
asking how.
--
Jean Louis
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Is there REPL for Bash?
2024-12-27 21:05 ` Joel Reicher
2024-12-28 7:19 ` tomas
2024-12-28 13:28 ` Jean Louis
@ 2024-12-28 13:47 ` Jean Louis
2 siblings, 0 replies; 9+ messages in thread
From: Jean Louis @ 2024-12-28 13:47 UTC (permalink / raw)
To: Joel Reicher; +Cc: Help GNU Emacs
Here is video how it works with sql-mode
https://gnu.support/images/2024/12/2024-12-28/sending-from-sql-buffer.mp4
I was convinced same thing exists for any programming language. That
is of course not the "REPL" but REPL-like, like inferior-lisp and
similar.
Evaluating in real time and seeing it on the side.
--
Jean Louis
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Is there REPL for Bash?
2024-12-27 9:26 Is there REPL for Bash? Jean Louis
2024-12-27 14:17 ` Joel Reicher
@ 2024-12-27 14:36 ` Eduardo Ochs
2024-12-27 16:16 ` Jean Louis
1 sibling, 1 reply; 9+ messages in thread
From: Eduardo Ochs @ 2024-12-27 14:36 UTC (permalink / raw)
To: Jean Louis; +Cc: Help GNU Emacs
On Fri, 27 Dec 2024 at 06:27, Jean Louis <bugs@gnu.support> wrote:
>
> I wonder if there is some REPL for Bash, so that I can write and
> evaluate shell script and see it evaluated in the side window?
Hi Jean,
check this:
http://anggtwu.net/2024-bash-test-blocks.html
Not exactly a REPL, but it lets me develop bash code in REPL-like way...
[[]]
Eduardo
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2024-12-28 13:47 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-27 9:26 Is there REPL for Bash? Jean Louis
2024-12-27 14:17 ` Joel Reicher
2024-12-27 16:14 ` Jean Louis
2024-12-27 21:05 ` Joel Reicher
2024-12-28 7:19 ` tomas
2024-12-28 13:28 ` Jean Louis
2024-12-28 13:47 ` Jean Louis
2024-12-27 14:36 ` Eduardo Ochs
2024-12-27 16:16 ` Jean Louis
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).