summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJos Verlinde <Jos_Verlinde@hotmail.com>2025-05-01 17:25:19 +0200
committerDamien George <damien@micropython.org>2025-08-02 00:23:21 +1000
commita9dd741e66a6afba3a6e862d134246d157a56777 (patch)
tree739ec957729a11e2eed135b5fdbe95fb36a6b7b4
parent64b3944b0121710199d8d5958415ce71f21d67a7 (diff)
docs/reference/mpremote: Document location of config file.
Signed-off-by: Jos Verlinde <Jos_Verlinde@hotmail.com>
-rw-r--r--docs/reference/mpremote.rst15
1 files changed, 11 insertions, 4 deletions
diff --git a/docs/reference/mpremote.rst b/docs/reference/mpremote.rst
index bee008c63..8aecc3a5d 100644
--- a/docs/reference/mpremote.rst
+++ b/docs/reference/mpremote.rst
@@ -108,7 +108,7 @@ The full list of supported commands are:
**Note:** Instead of using the ``connect`` command, there are several
:ref:`pre-defined shortcuts <mpremote_shortcuts>` for common device paths. For
example the ``a0`` shortcut command is equivalent to
- ``connect /dev/ttyACM0`` (Linux), or ``c0`` for ``COM0`` (Windows).
+ ``connect /dev/ttyACM0`` (Linux), or ``c1`` for ``COM1`` (Windows).
**Note:** The ``auto`` option will only detect USB serial ports, i.e. a serial
port that has an associated USB VID/PID (i.e. CDC/ACM or FTDI-style
@@ -487,9 +487,16 @@ Shortcuts can be defined using the macro system. Built-in shortcuts are:
- ``cat``, ``edit``, ``ls``, ``cp``, ``rm``, ``mkdir``, ``rmdir``, ``touch``: Aliases for ``fs <sub-command>``
-Additional shortcuts can be defined by in user-configuration files, which is
-located at ``.config/mpremote/config.py``. This file should define a
-dictionary named ``commands``. The keys of this dictionary are the shortcuts
+Additional shortcuts can be defined in the user configuration file ``mpremote/config.py``,
+located in the User Configuration Directory.
+The correct location for each OS is determined using the ``platformdirs`` module.
+
+This is typically:
+- ``$XDG_CONFIG_HOME/mpremote/config.py``
+- ``$HOME/.config/mpremote/config.py``
+- ``$env:LOCALAPPDATA/mpremote/config.py``
+
+The ``config.py``` file should define a dictionary named ``commands``. The keys of this dictionary are the shortcuts
and the values are either a string or a list-of-strings:
.. code-block:: python3