Configuration via environment variables
=======================================

:program:`rdial` defaults for many options can be configured via environment
variables.  The design purpose for supporting these environment variables is
to make it easy for users to configure per-project defaults using shell hooks.

.. envvar:: RDIAL_BACKUP

   This controls whether :program:`rdial` creates backup of data files.  It
   must be a boolean setting that accepts ``false``/``true``, ``0``/``1`` or
   ``n``/``y`` as its value.

.. envvar:: RDIAL_CACHE

   This controls whether :program:`rdial` creates a cache for data files.  It
   must be a boolean setting that accepts ``false``/``true``, ``0``/``1`` or
   ``n``/``y`` as its value.

.. envvar:: RDIAL_COLOUR

   This controls whether :program:`rdial` displays informational messages in
   colour.  It must be a boolean setting that accepts ``false``/``true``,
   ``0``/``1`` or ``n``/``y`` as its value.

.. envvar:: RDIAL_CONFIG

   The location of the :doc:`configuration <config>` file.  It must be a string
   value.

.. envvar:: RDIAL_DIRECTORY

   The location of the :program:`rdial` storage directory.  It must be a string
   value.

.. envvar:: RDIAL_INTERACTIVE

   This controls whether :program:`rdial` asks for messages interactively if
   they’re not provided as arguments.  It must be a boolean setting that
   accepts ``false``/``true``, ``0``/``1`` or ``n``/``y`` as its value.

.. envvar:: RDIAL_RATE

   The value for the :option:`rdial ledger -r` hourly rate setting.  It must be
   a numeric value.

.. envvar:: RDIAL_REVERSE

   This controls whether :program:`rdial report` inverts the sort order when
   displaying reports.  It is a boolean setting that accepts
   ``false``/``true``, ``0``/``1`` or ``n``/``y`` as its value.

.. envvar:: RDIAL_SORT

   This controls the sorting order for output generated by :program:`rdial
   report`.  It can either ``task`` or ``time`` to sort by task name or
   cumulative time respectively.

.. envvar:: RDIAL_TASK

   This controls the default task name for :program:`rdial`, and is a good way
   to configure a project default within a shell hook.  It must be a string
   value.
