From 71106bcd3946b77bbe94d6942af1131399789237 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 16 Jan 2022 15:58:11 +0530 Subject: [PATCH] Shell integration: Dont override fish's native title setting functionality See discussion: https://github.com/fish-shell/fish-shell/issues/8641 --- docs/changelog.rst | 6 +++--- docs/shell-integration.rst | 6 ++++-- .../vendor_conf.d/kitty-shell-integration.fish | 18 ------------------ 3 files changed, 7 insertions(+), 23 deletions(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index a38845079..dadf6211a 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -95,11 +95,11 @@ Detailed list of changes rather than a plane. This means the first and last window are considered neighbors (:iss:`4494`) -- Shell integration: Fix cursor shape not working with fish's vi mode +- Shell integration: fish: Fix cursor shape not working with fish's vi mode (:iss:`4508`) -- Shell integration: fish: Only override fish_title if it has not been set by - the user (:iss:`4452`) +- Shell integration: fish: Dont override fish's native title setting functionality. + See `discussion https://github.com/fish-shell/fish-shell/issues/8641`__. - macOS: Fix hiding via :kbd:`cmd+h` not working on macOS 10.15.7 (:iss:`4472`) diff --git a/docs/shell-integration.rst b/docs/shell-integration.rst index 0e81598d8..27e30818f 100644 --- a/docs/shell-integration.rst +++ b/docs/shell-integration.rst @@ -26,7 +26,7 @@ Features to view it in a pager * The current working directory or the command being executed are automatically - displayed in the kitty window titlebar/tab title. + displayed in the kitty window titlebar/tab title * The text cursor is changed to a bar when editing commands at the shell prompt @@ -58,7 +58,9 @@ no-cursor Turn off changing of the text cursor to a bar when editing text no-title - Turn off setting the kitty window/tab title based on shell state + Turn off setting the kitty window/tab title based on shell state. + Note that for the ``fish`` shell kitty relies on fish's native title + setting functionality instead. no-prompt-mark Turn off marking of prompts. This disables jumping to prompt, browsing diff --git a/shell-integration/fish/vendor_conf.d/kitty-shell-integration.fish b/shell-integration/fish/vendor_conf.d/kitty-shell-integration.fish index ef8a8d52d..50b18d675 100644 --- a/shell-integration/fish/vendor_conf.d/kitty-shell-integration.fish +++ b/shell-integration/fish/vendor_conf.d/kitty-shell-integration.fish @@ -76,24 +76,6 @@ function _ksi_main functions --erase _ksi_set_vi_cursor end - if not contains "no-title" $_ksi - function _ksi_function_is_not_overridden -d "Check if the specified function is not overridden" - functions --details $argv[1] | string match -q -- "$__fish_data_dir/functions/*" - end - - if _ksi_function_is_not_overridden fish_title - function fish_title - if set -q argv[1] - echo $argv[1] - else - prompt_pwd - end - end - end - - functions --erase _ksi_function_is_not_overridden - end - if not contains "no-prompt-mark" $_ksi and not functions -q _ksi_mark set --global _ksi_prompt_state "first-run"