Feature request - add an example to docs for using bash #14550
jamesowers-cohere
started this conversation in
Feature Requests
Replies: 1 comment
-
|
@jamesowers-cohere feature requests are to be made in discussions. Any opened issues should followed the clear guidelines provided in the issue picker and in the issues/discussions templates. Opening a new issue about the same thing already opened in a feature request is unnecessary and the opposite actually. Thank you for your interest and understanding. I'm going to convert this back to discussion. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Note this is re-raised from https://github.com/orgs/quarto-dev/discussions/4634#discussioncomment-14840326 which has gone stale and the issue is mixed purpose.
Please may you add an example to your documentation for how you recommend users create a .qmd which uses bash which, in a similar way to python, keeps the session alive between cells (unlike using bash cells with the knitr engine).
I want to make clear right up top that I'm not suggesting that the Quarto project should create an engine for every language. I'm suggesting that the ability to run shell code (particularly bash) with a persistent shell between code blocks is a very common thing to want to do, very valuable, and there are other similar projects that do it well (e.g. Atuin). Simply having some documentation which demonstrates how to do this with existing methods would be really really helpful.
I currently maintain an internal quarto website project with many active contributors, and a couple of hundred pages. It would be really lovely if there was a simple "bash" engine (or well supported route). The following approaches don't work well for us:
The issue with https://github.com/takluyver/bash_kernel (aside from the fact there's been no active contribution since 2023) is the part which auto restarts the kernel.
This means that if you have code in your .qmd like this:
Whilst I expect the
quarto renderprocess to fail and exit atexit 1it does not! It proceeds to the next cell... this is very unexpected and breaks my use case!Here's a full file to aid reproduction of the issue if necessary:
bash_kernel_gotchas.qmd
Here's a screenshot of what happens when that qmd is run - as far as quarto is concerned there was no error!

To reiterate, I don't think it's your responsibility to fix or maintain https://github.com/takluyver/bash_kernel. But if you do not provide an example qmd in your docs which demonstrates how I can write documentation and use a persistent bash shell, then it falls to me to:
If you agree with my claim that the ability to create a qmd file which runs shell code (particularly bash) with a persistent shell between code blocks is a very common thing to want to do, and very valuable, then you have an opportunity to make your project much more obviously valuable and usable to more people by adding a simple example to your docs! I would be enormously grateful for such an addition.
Originally posted by @jamesowers-cohere in #4634 (comment)
Beta Was this translation helpful? Give feedback.
All reactions