Skip to content

Commit

Permalink
Add a note about how to use edit-in-kitty with sudo to edit root files
Browse files Browse the repository at this point in the history
  • Loading branch information
kovidgoyal committed Mar 22, 2024
1 parent 55feef8 commit 9df7460
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/shell-integration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,10 @@ window, etc. Not all arguments are supported, see the discussion in the
In order to avoid remote code execution, kitty will only execute the configured
editor and pass the file path to edit to it.

.. note:: To edit files using sudo the best method is to set the
:code:`SUDO_EDITOR` environment variable to ``kitten edit-in-kitty`` and
then edit the file using the ``sudoedit`` or ``sudo -e`` commands.


.. _run_shell:

Expand Down

0 comments on commit 9df7460

Please sign in to comment.