Skip to content

Commit c97cea1

Browse files
committed
Fix some manpage issues
Closes #312, #311
1 parent 43f416e commit c97cea1

File tree

2 files changed

+41
-68
lines changed

2 files changed

+41
-68
lines changed

man-page/py.1

+38-65
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,47 @@
1-
.\" Automatically generated by Pandoc 2.2.1
1+
.\" Automatically generated by Pandoc 3.2.1
22
.\"
3-
.TH "PY" "1" "2022-11-04" "Python Launcher 1.0.0" "Python Launcher"
4-
.hy
3+
.TH "PY" "1" "2024-06-30" "Python Launcher 1.0.1" "Python Launcher"
54
.SH NAME
6-
.PP
75
py \- launch a Python interpreter
86
.SH SYNOPSIS
9-
.PP
10-
\f[B]py\f[] [\f[B]\-[X]/[X.Y]\f[]] \&...
7+
\f[B]py\f[R] [\f[B]\-[X]/[X.Y]\f[R]] \&...
118
.SH DESCRIPTION
12-
.PP
13-
\f[B]py\f[] launches the most appropriate Python interpreter it can
9+
\f[B]py\f[R] launches the most appropriate Python interpreter it can
1410
find.
15-
It is meant to act as a shorthand for launching \f[B]python\f[] without
16-
having to think about \f[I]which\f[] Python interpreter is the most
11+
It is meant to act as a shorthand for launching \f[B]python\f[R] without
12+
having to think about \f[I]which\f[R] Python interpreter is the most
1713
desired.
1814
The Python Launcher is not meant to substitute all ways of launching
1915
Python, e.g.\ if a specific Python interpreter is desired then it is
2016
assumed it will be directly executed.
2117
.SH SPECIFYING A PYTHON VERSION
22-
.PP
23-
If a command\-line option is provided in the form of \f[B]\-X\f[] or
24-
\f[B]\-X.Y\f[] where \f[I]X\f[] and \f[I]Y\f[] are integers, then that
25-
version of Python will be launched (if available).
26-
For instance, providing \f[B]\-3\f[] will launch the newest version of
27-
Python 3 while \f[B]\-3.6\f[] will try to launch Python 3.6.
18+
If a command\-line option is provided in the form of \f[B]\-X\f[R] or
19+
\f[B]\-X.Y\f[R] where \f[I]X\f[R] and \f[I]Y\f[R] are integers, then
20+
that version of Python will be launched (if available).
21+
For instance, providing \f[B]\-3\f[R] will launch the newest version of
22+
Python 3 while \f[B]\-3.6\f[R] will try to launch Python 3.6.
2823
.SH SEARCHING FOR PYTHON INTERPRETERS
29-
.PP
3024
When no command\-line arguments are provided to the launcher, what is
3125
deemed the most \[lq]appropriate\[rq] interpreter is searched for as
3226
follows:
3327
.IP "1." 3
3428
An activated virtual environment (launched immediately if available)
3529
.IP "2." 3
36-
A \f[B].venv\f[] directory in the current working directory or any
30+
A \f[B].venv\f[R] directory in the current working directory or any
3731
parent directory containing a virtual environment (launched immediately
3832
if available)
3933
.IP "3." 3
4034
If a file path is provided as the first argument, look for a shebang
41-
line containing \f[B]/usr/bin/python\f[],
42-
\f[B]/usr/local/bin/python\f[], \f[B]/usr/bin/env python\f[] or
43-
\f[B]python\f[] and any version specification in the executable name is
44-
treated as a version specifier (like with \f[B]\-X\f[]/\f[B]\-X.Y\f[]
35+
line containing \f[B]/usr/bin/python\f[R],
36+
\f[B]/usr/local/bin/python\f[R], \f[B]/usr/bin/env python\f[R] or
37+
\f[B]python\f[R] and any version specification in the executable name is
38+
treated as a version specifier (like with \f[B]\-X\f[R]/\f[B]\-X.Y\f[R]
4539
command\-line options)
4640
.IP "4." 3
4741
Check for any appropriate environment variable (see
48-
\f[B]ENVIRONMENT\f[])
42+
\f[B]ENVIRONMENT\f[R])
4943
.IP "5." 3
50-
Search \f[B]PATH\f[] for all \f[B]pythonX.Y\f[] executables
44+
Search \f[B]PATH\f[R] for all \f[B]pythonX.Y\f[R] executables
5145
.IP "6." 3
5246
Launch the newest version of Python (while matching any version
5347
restrictions previously specified)
@@ -56,70 +50,49 @@ All unrecognized command\-line arguments are passed on to the launched
5650
Python interpreter.
5751
.SH OPTIONS
5852
.TP
59-
.B \f[B]\-h\f[]/\f[B]\[en]help\f[]
53+
\f[B]\-h\f[R], \f[B]\-\-help\f[R]
6054
Print a help message and exit; must be specified on its own.
61-
.RS
62-
.RE
6355
.TP
64-
.B \f[B]\[en]list\f[]
65-
List all known interpreters (except activated virtual environment); must
66-
be specified on its own.
67-
.RS
68-
.RE
56+
\f[B]\-\-list\f[R]
57+
List all known interpreters (except virtual environments); must be
58+
specified on its own.
6959
.TP
70-
.B \f[B]\-[X]\f[]
71-
Launch the latest Python \f[I]X\f[] version (e.g.
72-
\f[B]\-3\f[] for the latest Python 3).
73-
See \f[B]ENVIRONMENT\f[] for details on the \f[B]PY_VERSION[X]\f[]
60+
\f[B]\-[X]\f[R]
61+
Launch the latest Python \f[I]X\f[R] version (e.g.\ \f[B]\-3\f[R] for
62+
the latest Python 3).
63+
See \f[B]ENVIRONMENT\f[R] for details on the \f[B]PY_VERSION[X]\f[R]
7464
environment variable.
75-
.RS
76-
.RE
7765
.TP
78-
.B \f[B]\-[X.Y]\f[]
79-
Launch the specified Python version (e.g.
80-
\f[B]\-3.6\f[] for Python 3.6).
81-
.RS
82-
.RE
66+
\f[B]\-[X.Y]\f[R]
67+
Launch the specified Python version (e.g.\ \f[B]\-3.6\f[R] for Python
68+
3.6).
8369
.SH ENVIRONMENT
8470
.TP
85-
.B \f[B]PY_PYTHON\f[]
71+
\f[B]PY_PYTHON\f[R]
8672
Specify the version of Python to search for when no Python version is
87-
explicitly requested (must be formatted as `X.Y'; e.g.
88-
\f[B]3.6\f[] to use Python 3.6 by default).
89-
.RS
90-
.RE
73+
explicitly requested (must be formatted as `X.Y'; e.g.\ \f[B]3.6\f[R] to
74+
use Python 3.6 by default).
9175
.TP
92-
.B \f[B]PY_PYTHON[X]\f[]
76+
\f[B]PY_PYTHON[X]\f[R]
9377
Specify the version of Python to search for when only a major version is
94-
specified (must be formatted as `X.Y'; e.g.\ set \f[B]PY_PYTHON3\f[] to
95-
\f[B]3.6\f[] to cause \f[B]\-3\f[] to use Python 3.6).
96-
.RS
97-
.RE
78+
specified (must be formatted as `X.Y'; e.g.\ set \f[B]PY_PYTHON3\f[R] to
79+
\f[B]3.6\f[R] to cause \f[B]\-3\f[R] to use Python 3.6).
9880
.TP
99-
.B \f[B]PYLAUNCH_DEBUG\f[]
81+
\f[B]PYLAUNCH_DEBUG\f[R]
10082
Log details to stderr about how the Launcher is operating.
101-
.RS
102-
.RE
10383
.TP
104-
.B \f[B]VIRTUAL_ENV\f[]
84+
\f[B]VIRTUAL_ENV\f[R]
10585
Path to a directory containing virtual environment to use when no Python
10686
version is explicitly requested; typically set by activating a virtual
10787
environment.
108-
.RS
109-
.RE
11088
.TP
111-
.B \f[B]PATH\f[]
89+
\f[B]PATH\f[R]
11290
Used to search for Python interpreters.
113-
.RS
114-
.RE
11591
.SH AUTHORS
116-
.PP
11792
Copyright © 2018 Brett Cannon.
11893
.PP
11994
Licensed under MIT.
12095
.SH HOMEPAGE
121-
.PP
12296
https://github.com/brettcannon/python\-launcher/
12397
.SH SEE ALSO
124-
.PP
12598
python(1), python3(1).

man-page/py.1.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ interpreter.
5353

5454
# OPTIONS
5555

56-
**-h**/**--help**
56+
**-h**, **\--help**
5757
: Print a help message and exit; must be specified on its own.
5858

59-
**--list**
60-
: List all known interpreters (except activated virtual environment);
59+
**\--list**
60+
: List all known interpreters (except virtual environments);
6161
must be specified on its own.
6262

6363
**-[X]**

0 commit comments

Comments
 (0)