byexamples / byexamples/byexample
Run an example in a separated `byexample` execution
- Dominant language
- Python
- Stars
- 67
- Forks
- 9
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the feature you'd like**
Sounds weird but there are cases where we want to show how
a bad written example breaks `byexample` and writing the
example in the documentation itself breaks it of course.
Currently the trick is to write the offensive example
in a separated file and run it with `byexample` from
a `shell` example.
Typically we also do a `cat` to show the content of the
file.
Also, because the file probably has other examples
that we don't want to run, when we do the `cat` we prepend
the `~` marker that we remove later with `+rm=~`.
All of this is quite disruptive.
It would be cool to write the offensive example directly in
the documentation like any other example but marking it
in somehow (with an option perhaps? `-x-fork`?)
`byexample` should then spawn a fork of itself and run that example
only and all the output will be seen as the output of the example
hiding the fact that we ran another `byexample` instance; no need
to do a `cat`.
Contributor guide
Assessment
This issue has not been assessed yet.