Skip to content

Commit 2856d2f

Browse files
committed
Adjust code-block source identifiers
This prevents GitHub from showing a copy button, which unfortunately causes it to copy the prompt in addition to the commands.
1 parent 7d903ca commit 2856d2f

File tree

1 file changed

+19
-17
lines changed

1 file changed

+19
-17
lines changed

README.rst

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ starts with installing Cookiecutter. This is best done by creating a new
8282
virtual environment specifically for cookiecutter and then installing
8383
cookiecutter using ``pip``. The example below shows how to do this.
8484

85-
.. code-block:: console
85+
.. code-block:: shell-session
8686
8787
$ python -m venv --prompt cc ccvenv
8888
$
@@ -114,13 +114,13 @@ it may be required for cookiecutter to function if using it to clone
114114
this template). Under Windows, you can use `winget
115115
<https://learn.microsoft.com/en-us/windows/package-manager/winget/>`_.
116116

117-
.. code-block:: console
117+
.. code-block:: shell-session
118118
119119
(cc) $ winget install --id Git.Git --exact --source winget
120120
121121
Under macOS you can use `brew <https://brew.sh/>`_.
122122

123-
.. code-block:: console
123+
.. code-block:: shell-session
124124
125125
(cc) $ brew install git
126126
@@ -137,7 +137,7 @@ If you wish to use the fancy Makefile included in this project, you
137137
may wish to install the ``make`` command. Under Windows, again using
138138
winget:
139139

140-
.. code-block:: console
140+
.. code-block:: shell-session
141141
142142
(cc) $ winget install --id GnuWin32.Make --exact --source winget
143143
@@ -148,7 +148,7 @@ containing ``make.exe`` to your PATH, which is typically something like:
148148

149149
Under macOS you can again use brew.
150150

151-
.. code-block:: console
151+
.. code-block:: shell-session
152152
153153
(cc) $ brew install make
154154
@@ -168,7 +168,7 @@ execution policy to permit them. This can be done by opening a Windows
168168
PowerShell as an administrator (just right-click the launcher and
169169
select ``Run as Administrator``) and issuing the following command:
170170

171-
.. code-block:: console
171+
.. code-block:: shell-session
172172
173173
PS > Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
174174
@@ -192,14 +192,14 @@ The easiest method (which will fail if ``git`` is not installed) is to
192192
reference this template via its GitHub URL (where 'gh' is a shortened
193193
form for GitHub):
194194

195-
.. code-block:: console
195+
.. code-block:: shell-session
196196
197197
(cc) $ cookiecutter gh:boltronics/cookiecutter-python-project
198198
199199
Alternatively, if you have cloned or downloaded a local copy of this
200200
template, you can reference it directly:
201201

202-
.. code-block:: console
202+
.. code-block:: shell-session
203203
204204
(cc) $ cookiecutter path/to/cookiecutter-python-project
205205
@@ -210,7 +210,7 @@ shown in order.
210210
Once you have generated your new Python package project you can exit the
211211
cookiecutter virtual environment as it is no longer required.
212212

213-
.. code-block:: console
213+
.. code-block:: shell-session
214214
215215
(cc) $ deactivate
216216
$
@@ -258,7 +258,7 @@ and hyphens in it. The package display name is first converted to lowercase
258258
text and then any spaces or hyphens are converted to underscores to produce a
259259
Python package name.
260260

261-
.. code-block:: console
261+
.. code-block:: shell-session
262262
263263
(cc) $ cookiecutter gh:boltronics/cookiecutter-python-project
264264
[1/10] package_display_name (Package-Name): abc 123
@@ -284,14 +284,14 @@ Python package name.
284284
285285
The project has been created in the ``abc_123`` directory.
286286

287-
.. code-block:: console
287+
.. code-block:: shell-session
288288
289289
$ cd abc_123
290290
291291
If you are planning to use git, it might be a good idea to create a
292292
new repository at this point.
293293

294-
.. code-block:: console
294+
.. code-block:: shell-session
295295
296296
$ git init
297297
$ git add .
@@ -307,7 +307,7 @@ First, let's enter a project-specific virtual environment. Hatch
307307
will install any of the project's dependencies (if added to pyproject.toml) as well as
308308
the project itself as an editable package.
309309

310-
.. code-block:: console
310+
.. code-block:: shell-session
311311
312312
$ hatch shell
313313
(abc_123) $
@@ -321,7 +321,7 @@ There are a number of other virtual environments available to you, and
321321
most of these have their own packages and scripts to ease
322322
development. You can bring up a summary like so:
323323

324-
.. code-block:: console
324+
.. code-block:: shell-session
325325
326326
$ hatch env show
327327
Standalone
@@ -358,7 +358,7 @@ development. You can bring up a summary like so:
358358
359359
You can enter use these virtual environments like so:
360360

361-
.. code-block:: console
361+
.. code-block:: shell-session
362362
363363
$ hatch shell types
364364
(types) $ pip freeze
@@ -391,7 +391,7 @@ If you have make installed, the included Makefile provides handy
391391
shortcuts for various Hatch commands and the configured scripts. You
392392
can print a summary of options via the `make help` command, like so:
393393

394-
.. code-block:: console
394+
.. code-block:: shell-session
395395
396396
$ make help
397397
@@ -420,10 +420,12 @@ can print a summary of options via the `make help` command, like so:
420420
dist-test - test a wheel distribution package
421421
dist-upload - upload a wheel distribution package
422422
423+
$
424+
423425
424426
Here is an example of one in action:
425427

426-
.. code-block:: console
428+
.. code-block:: shell-session
427429
428430
$ make test-verbose
429431
────────────────────────────── hatch-test.py3.13 ───────────────────────────────

0 commit comments

Comments
 (0)