Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: how to define bash functions in md files code blocks? #427

Open
mbarbin opened this issue Apr 25, 2023 · 0 comments
Open

Question: how to define bash functions in md files code blocks? #427

mbarbin opened this issue Apr 25, 2023 · 0 comments

Comments

@mbarbin
Copy link

mbarbin commented Apr 25, 2023

In OCaml code blocks, the environment enriches as you add more code, and you can even specify distinct environments. I wonder if there's an equivalent for sh code blocks. Can you define a function in one block, and use it in another subsequent block (in the same md file). Is there a similar notion of environment?

I couldn't find how to define a function, but I suspect this is simply because I failed at finding the right syntax for multi-lines sh blocks in the presence of curly brackets, and I'm getting it mixed up with the one for cram, which I suspect doesn't use the exact same quoting mechanism. I'm probably wrong and confused there.

Thank you for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant