Skip to content

Commit 668a415

Browse files
committed
docs/reference/mpremote: Document location of config file.
Signed-off-by: Jos Verlinde <Jos_Verlinde@hotmail.com>
1 parent 77b368b commit 668a415

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

docs/reference/mpremote.rst

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ The full list of supported commands are:
108108
**Note:** Instead of using the ``connect`` command, there are several
109109
:ref:`pre-defined shortcuts <mpremote_shortcuts>` for common device paths. For
110110
example the ``a0`` shortcut command is equivalent to
111-
``connect /dev/ttyACM0`` (Linux), or ``c0`` for ``COM0`` (Windows).
111+
``connect /dev/ttyACM0`` (Linux), or ``c1`` for ``COM1`` (Windows).
112112

113113
**Note:** The ``auto`` option will only detect USB serial ports, i.e. a serial
114114
port that has an associated USB VID/PID (i.e. CDC/ACM or FTDI-style
@@ -479,9 +479,16 @@ Shortcuts can be defined using the macro system. Built-in shortcuts are:
479479

480480
- ``cat``, ``edit``, ``ls``, ``cp``, ``rm``, ``mkdir``, ``rmdir``, ``touch``: Aliases for ``fs <sub-command>``
481481

482-
Additional shortcuts can be defined by in user-configuration files, which is
483-
located at ``.config/mpremote/config.py``. This file should define a
484-
dictionary named ``commands``. The keys of this dictionary are the shortcuts
482+
Additional shortcuts can be defined by in the user configuration file ``mpremote/config.py``, located in
483+
the User Configuration Directory.
484+
The correct location for each OS is determined using the ``platformdirs`` module.
485+
486+
This is typically:
487+
# ``$XDG_CONFIG_HOME/mpremote/config.py``
488+
# ``$HOME/.config/mpremote/config.py``
489+
# ``$env:LOCALAPPDATA/mpremote/config.py``
490+
491+
The ``config.py``` file should define a dictionary named ``commands``. The keys of this dictionary are the shortcuts
485492
and the values are either a string or a list-of-strings:
486493

487494
.. code-block:: python3

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy