.. program:: kitty +kitten diff


.. highlight:: sh
.. code-block:: sh

  kitty +kitten diff [options] file_or_directory_left file_or_directory_right

Show a side-by-side diff of the specified files/directories. You can also use ssh:hostname:remote-file-path to diff remote files.

Options
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. option:: --context <CONTEXT>

    Number of lines of context to show between changes. Negative values use the number set in diff.conf
    Default: :code:`-1`

.. option:: --config <CONFIG>

    Specify a path to the configuration file(s) to use. All configuration files are merged onto the builtin diff.conf, overriding the builtin values. This option can be specified multiple times to read multiple configuration files in sequence, which are merged. Use the special value NONE to not load a config file.

    If this option is not specified, config files are searched for in the order: :file:`$XDG_CONFIG_HOME/kitty/diff.conf`, :file:`~/.config/kitty/diff.conf`, :file:`$XDG_CONFIG_DIRS/kitty/diff.conf`. The first one that exists is used as the config file.

    If the environment variable :env:`KITTY_CONFIG_DIRECTORY` is specified, that directory is always used and the above searching does not happen.

    If :file:`/etc/xdg/kitty/diff.conf` exists it is merged before (i.e. with lower priority) than any user config files. It can be used to specify system-wide defaults for all users.

.. option:: --override <OVERRIDE>, -o <OVERRIDE>

    Override individual configuration options, can be specified multiple times. Syntax: :italic:`name=value`. For example: :italic:`-o background=gray`

