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

Option to change command that appears at prompt #37

Open
h1nk opened this issue Jun 15, 2019 · 1 comment
Open

Option to change command that appears at prompt #37

h1nk opened this issue Jun 15, 2019 · 1 comment

Comments

@h1nk
Copy link

h1nk commented Jun 15, 2019

In my current use case I'm capturing the help output of a command within a project I'm documenting.

Something like so:

.. command-output:: python -m package.command --help

Which builds to:

$ python -m package.command --help

...

This works as expected, which is great. My problem however is that I really want to have the name of the setuputil's script entry-point appear at the prompt instead, as this is realistically how most users will invoke the command. It would be nice if an option could be added to modify/override the command that appears at the prompt.

@jamadden
Copy link
Member

If you're only using the directive once, you could (ab)use programoutput_prompt_template in the sphinx setup to do this. Something like programoutput_prompt_template = "$ my_entry_point --help\n{output}".

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

No branches or pull requests

2 participants