mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-06 16:05:05 +02:00
Only run manual shell integration is KITTY_INSTALLATION_DIR is set
Also add a note about how to get it to work with SSH.
This commit is contained in:
@@ -144,23 +144,29 @@ Then in your shell's rc file, add the lines:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
export KITTY_SHELL_INTEGRATION="enabled"
|
||||
source "$KITTY_INSTALLATION_DIR/shell-integration/kitty.bash"
|
||||
if [[ ! -z "$KITTY_INSTALLATION_DIR" ]]; then
|
||||
export KITTY_SHELL_INTEGRATION="enabled"
|
||||
source "$KITTY_INSTALLATION_DIR/shell-integration/kitty.bash"
|
||||
fi
|
||||
|
||||
.. tab:: zsh
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
export KITTY_SHELL_INTEGRATION="enabled"
|
||||
source "$KITTY_INSTALLATION_DIR/shell-integration/kitty.zsh"
|
||||
if [[ ! -z "$KITTY_INSTALLATION_DIR" ]]; then
|
||||
export KITTY_SHELL_INTEGRATION="enabled"
|
||||
source "$KITTY_INSTALLATION_DIR/shell-integration/kitty.zsh"
|
||||
fi
|
||||
|
||||
.. tab:: fish
|
||||
|
||||
.. code-block:: fish
|
||||
|
||||
set --global KITTY_SHELL_INTEGRATION enabled
|
||||
source "$KITTY_INSTALLATION_DIR/shell-integration/fish/vendor_conf.d/kitty-shell-integration.fish"
|
||||
set --prepend fish_complete_path "$KITTY_INSTALLATION_DIR/shell-integration/fish/vendor_completions.d"
|
||||
if set -q KITTY_INSTALLATION_DIR
|
||||
set --global KITTY_SHELL_INTEGRATION enabled
|
||||
source "$KITTY_INSTALLATION_DIR/shell-integration/fish/vendor_conf.d/kitty-shell-integration.fish"
|
||||
set --prepend fish_complete_path "$KITTY_INSTALLATION_DIR/shell-integration/fish/vendor_completions.d"
|
||||
end
|
||||
|
||||
|
||||
The value of :envvar:`KITTY_SHELL_INTEGRATION` is the same as that for
|
||||
@@ -168,6 +174,11 @@ The value of :envvar:`KITTY_SHELL_INTEGRATION` is the same as that for
|
||||
completely, in which case simply do not set the
|
||||
:envvar:`KITTY_SHELL_INTEGRATION` variable at all.
|
||||
|
||||
If you want this to work while SSHing into a remote system, then you will
|
||||
need to add some code to the snippets above to check if :code:`KITTY_INSTALLATION_DIR`
|
||||
is empty and if so to set it to some hard coded location with the shell
|
||||
integration scripts that need to be copied onto the remote system.
|
||||
|
||||
|
||||
Notes for shell developers
|
||||
-----------------------------
|
||||
|
||||
Reference in New Issue
Block a user