doc/application: Use tabs for Setting Variables
Setting variables for console is platform dependent. Having uninterested platform mixed in is too noisy and hard to read. Follow "Getting Started Guide" pattern to use tabs to group things. Getting Started Guide uses "Ubuntu" to reference Linux based platform but Application Development uses "Linux". This commit doesn't change the choice of words and sticks to "Linux". The order of the platfroms is, OTOH, unified to "Linux/macOS" from "macOS/Linux". This commit only changes formatting, no wording change. Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
This commit is contained in:
parent
0851255258
commit
b48276e995
1 changed files with 65 additions and 55 deletions
|
@ -269,12 +269,18 @@ Option 1: Just Once
|
|||
To set the environment variable :envvar:`MY_VARIABLE` to ``foo`` for the
|
||||
lifetime of your current terminal window:
|
||||
|
||||
.. tabs::
|
||||
|
||||
.. group-tab:: Linux/macOS
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
# Linux and macOS
|
||||
export MY_VARIABLE=foo
|
||||
|
||||
# Windows
|
||||
.. group-tab:: Windows
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
set MY_VARIABLE=foo
|
||||
|
||||
.. warning::
|
||||
|
@ -288,28 +294,30 @@ lifetime of your current terminal window:
|
|||
Option 2: In all Terminals
|
||||
==========================
|
||||
|
||||
**macOS and Linux**:
|
||||
.. tabs::
|
||||
|
||||
Add the ``export MY_VARIABLE=foo`` line to your shell's startup script in your
|
||||
home directory. For Bash, this is usually :file:`~/.bashrc` on Linux or
|
||||
:file:`~/.bash_profile` on macOS. Changes in these startup scripts don't
|
||||
affect shell instances already started; try opening a new terminal window to get
|
||||
the new settings.
|
||||
.. group-tab:: Linux/macOS
|
||||
|
||||
**Windows**:
|
||||
Add the ``export MY_VARIABLE=foo`` line to your shell's startup script in
|
||||
your home directory. For Bash, this is usually :file:`~/.bashrc` on Linux
|
||||
or :file:`~/.bash_profile` on macOS. Changes in these startup scripts
|
||||
don't affect shell instances already started; try opening a new terminal
|
||||
window to get the new settings.
|
||||
|
||||
You can use the ``setx`` program in ``cmd.exe`` or the third-party
|
||||
RapidEE program.
|
||||
.. group-tab:: Windows
|
||||
|
||||
To use ``setx``, type this command, then close the terminal window. Any new
|
||||
``cmd.exe`` windows will have :envvar:`MY_VARIABLE` set to ``foo``.
|
||||
You can use the ``setx`` program in ``cmd.exe`` or the third-party RapidEE
|
||||
program.
|
||||
|
||||
To use ``setx``, type this command, then close the terminal window. Any
|
||||
new ``cmd.exe`` windows will have :envvar:`MY_VARIABLE` set to ``foo``.
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
setx MY_VARIABLE foo
|
||||
|
||||
To install RapidEE, a freeware graphical environment variable
|
||||
editor, `using Chocolatey`_ in an Administrator command prompt:
|
||||
To install RapidEE, a freeware graphical environment variable editor,
|
||||
`using Chocolatey`_ in an Administrator command prompt:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
|
@ -330,35 +338,37 @@ Choose this option if you don't want to make the variable's setting available
|
|||
to all of your terminals, but still want to save the value for loading into
|
||||
your environment when you are using Zephyr.
|
||||
|
||||
**macOS and Linux**:
|
||||
.. tabs::
|
||||
|
||||
Create a file named :file:`~/.zephyrrc` if it doesn't exist, then add this line
|
||||
to it:
|
||||
.. group-tab:: Linux/macOS
|
||||
|
||||
Create a file named :file:`~/.zephyrrc` if it doesn't exist, then add this
|
||||
line to it:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
export MY_VARIABLE=foo
|
||||
|
||||
To get this value back into your current terminal environment, **you must run**
|
||||
``source zephyr-env.sh`` from the main ``zephyr`` repository. Among other
|
||||
things, this script sources :file:`~/.zephyrrc`.
|
||||
To get this value back into your current terminal environment, **you must
|
||||
run** ``source zephyr-env.sh`` from the main ``zephyr`` repository. Among
|
||||
other things, this script sources :file:`~/.zephyrrc`.
|
||||
|
||||
The value will be lost if you close the window, etc.; run ``source
|
||||
zephyr-env.sh`` again to get it back.
|
||||
|
||||
**Windows**:
|
||||
.. group-tab:: Windows
|
||||
|
||||
Add the line ``set MY_VARIABLE=foo`` to the file
|
||||
:file:`%userprofile%\\zephyrrc.cmd` using a text editor such as Notepad to save
|
||||
the value.
|
||||
:file:`%userprofile%\\zephyrrc.cmd` using a text editor such as Notepad to
|
||||
save the value.
|
||||
|
||||
To get this value back into your current terminal environment, **you must run**
|
||||
``zephyr-env.cmd`` in a ``cmd.exe`` window after changing directory to the main
|
||||
``zephyr`` repository. Among other things, this script runs
|
||||
To get this value back into your current terminal environment, **you must
|
||||
run** ``zephyr-env.cmd`` in a ``cmd.exe`` window after changing directory
|
||||
to the main ``zephyr`` repository. Among other things, this script runs
|
||||
:file:`%userprofile%\\zephyrrc.cmd`.
|
||||
|
||||
The value will be lost if you close the window, etc.; run ``zephyr-env.cmd``
|
||||
again to get it back.
|
||||
The value will be lost if you close the window, etc.; run
|
||||
``zephyr-env.cmd`` again to get it back.
|
||||
|
||||
These scripts:
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue