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

disallow selecting shell prompt in code samples #7403

Merged
merged 1 commit into from
Feb 10, 2023

Conversation

fricklerhandwerk
Copy link
Contributor

this is a quick half-fix for command line examples, as discussed
discussed in 1.

examples which look like this

$ foo bar
baz

are confusing for Unix shell beginners, because it's hard to discern
what is supposed to be entered into the actual command line when the
convention of prefixing $ is not known, as barely any real-world shell
looks that way any more.

this change prevents selecting the prompt part with the mouse in the
HTML representation of the Nix manual.

it does not prevent selecting the output part of the shell example.
it also does not address that the copy button provided by mdBook takes
the entire sample, including the prompts, into the clipboard.

this is a quick half-fix for command line examples, as discussed
discussed in [1].

[1]: NixOS#7389

examples which look like this

    $ foo bar
    baz

are confusing for Unix shell beginners, because it's hard to discern
what is supposed to be entered into the actual command line when the
convention of prefixing `$` is not known, as barely any real-world shell
looks that way any more.

this change prevents selecting the prompt part with the mouse in the
HTML representation of the Nix manual.

it does not prevent selecting the output part of the shell example.
it also does not address that the copy button provided by mdBook takes
the entire sample, including the prompts, into the clipboard.
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/tweag-nix-dev-update-41/23848/1

@thufschmitt thufschmitt merged commit 320e391 into NixOS:master Feb 10, 2023
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/2023-02-10-nix-team-meeting-minutes-31/25438/1

@fricklerhandwerk fricklerhandwerk deleted the noselect branch October 9, 2023 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants