Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions reference/config_files/profiles.rst
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,9 @@ when you're composing profiles or even local variables:
* ``=+`` == ``prepend``: puts values at the beginning of the existing value.
* ``=!`` == ``unset``: gets rid of any variable value.

Note that it is different to define an empty variable, like ``MyVar1=``, which defines it with a value of an empty string,
that requesting it to be explicitly unset with the ``MyVar1=!`` syntax.

Another essential point to mention is the possibility of defining variables as `PATH` ones by simply putting ``(path)`` as
the prefix of the variable. It is useful to automatically get the append/prepend of the `PATH` in different systems
(Windows uses ``;`` as separation, and UNIX ``:``).
Expand All @@ -289,6 +292,9 @@ the prefix of the variable. It is useful to automatically get the append/prepend
# Append another value to "MyVar1"
MyVar1+=MyValue12

# Define a variable with an empty string value
MyVar2=

# Define a PATH variable "MyPath1"
MyPath1=(path)/some/path11

Expand All @@ -302,6 +308,7 @@ the prefix of the variable. It is useful to automatically get the append/prepend
Then, the result of applying this profile is:

* ``MyVar1``: ``My Value; other MyValue12``
* ``MyVar2``: An empty string value
* ``MyPath1``:
* Unix: ``/other path/path12:/some/path11``
* Windows: ``/other path/path12;/some/path11``
Expand Down