Closed kiteloopdesign closed 1 year ago
File "*****/.venv/lib/python3.9/site-packages/myst_parser/parsers/directives.py"
As you can see, your error is coming from your myst extension, not this package. So I can't help you with that.
Actually, what I would really like to get more info about is regarding on what environment are these commands really running on. This is, on what shell environment is this running? I guess on a one provided by python's subprocess? Is it possible to update $PATH document-wide via some python command on conf.py?
Yes, this package runs commands using the subprocess
module. Whether or not is uses a shell depends on whether you turn on the shell
option or not. The PATH
and the rest of the environment variables are entirely up to you, set them however you want to. Relative paths are interpreted as Sphinx normally interprets them.
I guess the question I was asking is, independently of that error which, you are right, comes from myst, is that syntax the expected one for "cwd" ? Or, in other words, doc doesn't give an example of how would one write it down in normal rst sphinx's markdown? would it be like so?
.. command-output:: echo "$USER"
:cwd:
Thanks
It's just a normal option like any other directive option. In other words, it works exactly the same as the examples for returncode
and ellipsis
.
Hi, thanks for this extension it is super useful for auto documenting cli tools!
One thing I can't get to work though is to get the "cwd" option. I don't think the documentation tells how this option should be used?
Note that I am trying to get this work with Sphinx+MyST, so what I am trying is the following (note I am using 3x acute tilde so they are not incorrectly interpreted here)
This is, I am just trying to go up one folder before I can execute "pwd". However I get a big error when doing so:
Actually, what I would really like to get more info about is regarding on what environment are these commands really running on. This is, on what shell environment is this running? I guess on a one provided by python's subprocess? Is it possible to update $PATH document-wide via some python command on
conf.py
?Thanks