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

Using the copy button of the code block in the README results in error "zsh: command not found: $" #1246

Closed
activus-d opened this issue Apr 17, 2024 · 2 comments

Comments

@activus-d
Copy link

activus-d commented Apr 17, 2024

Description

When clicking the copy button from the block code in the README to install jsonschema, the copied text is $ pip install jsonschema. Running the copied command returns a "command not found: $" error. I believe this will be same for all other block codes in the README.

The possible solution is to modify the commands in the README.rst file to exclude the leading $ symbol. For example:

.. code:: bash

    pip install jsonschema
@activus-d
Copy link
Author

I can work on this issue if assigned.

@activus-d activus-d changed the title Using the copy button of the code block in the README.rst file results in error "zsh: command not found: $" Using the copy button of the code block in the README results in error "zsh: command not found: $" Apr 17, 2024
@Julian Julian closed this as completed in 939a066 Apr 21, 2024
@Julian
Copy link
Member

Julian commented Apr 21, 2024

Hi there! Thanks for the report. Showing a $ there is pretty common in documentation, it's meant to indicate a shell prompt, and should be understood not to be copied -- it's arguably also good that it's there, as it's good practice not to copy+paste shell commands in the first place!

That all being said though, I've slightly tweaked the settings for sphinx-copybutton which is the plugin we use to show a "copy to clipboard" button in the documentation, so that now at least if you use that, it's not included.

Appreciate the issue nonetheless.

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

2 participants