diff --git a/kitty_tests/shell_integration.py b/kitty_tests/shell_integration.py index b9c6c8b1c..9002ef90e 100644 --- a/kitty_tests/shell_integration.py +++ b/kitty_tests/shell_integration.py @@ -213,16 +213,8 @@ function _set_status_prompt; function fish_prompt; echo -n "$pipestatus $status pty.write_to_child('i') pty.wait_till(lambda: pty.screen.cursor.shape == CURSOR_BEAM) pty.send_cmd_to_child('_set_key default') - - # pipestatus - pty.send_cmd_to_child('clear;false|true|false') - pty.send_cmd_to_child('echo $pipestatus $status') - pty.wait_till(lambda: pty.screen_contents().count(right_prompt) == 2) - self.ae(pty.last_cmd_output(), '1 0 1 1') - pty.send_cmd_to_child('_set_status_prompt') - pty.send_cmd_to_child('false|true|false') pty.wait_till(lambda: pty.screen_contents().count(right_prompt) == 4) - self.assertTrue(str(pty.screen.line(pty.screen.cursor.y)).startswith(f'1 0 1 1 {fish_prompt}')) + pty.wait_till(lambda: pty.screen.cursor.shape == CURSOR_BEAM) pty.send_cmd_to_child('exit') 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 9efa1fa0e..e2ffc0e3f 100644 --- a/shell-integration/fish/vendor_conf.d/kitty-shell-integration.fish +++ b/shell-integration/fish/vendor_conf.d/kitty-shell-integration.fish @@ -19,7 +19,7 @@ end status is-interactive || exit 0 not functions -q __ksi_schedule || exit 0 -# Check fish version 3.3.0+ efficiently and fallback to check the last working version 3.2.0, exit on outdated versions. +# Check fish version 3.3.0+ efficiently and fallback to check the minimum working version 3.2.0, exit on outdated versions. # "Warning: Update fish to version 3.3.0+ to enable kitty shell integration.\n" set -q fish_killring || set -q status_generation || string match -qnv "3.1.*" "$version" or echo -en "\eP@kitty-print|V2FybmluZzogVXBkYXRlIGZpc2ggdG8gdmVyc2lvbiAzLjMuMCsgdG8gZW5hYmxlIGtpdHR5IHNoZWxsIGludGVncmF0aW9uLgo=\e\\" && exit 0 || exit 0 @@ -80,21 +80,6 @@ function __ksi_schedule --on-event fish_prompt -d "Setup kitty integration after end __ksi_mark_prompt_start - functions -c fish_prompt __ksi_original_fish_prompt - function fish_prompt - # fish trims one trailing newline from the output of fish_prompt, so - # we need to do the same. See https://github.com/kovidgoyal/kitty/issues/4032 - # op is a list because fish splits on newlines in command substitution - set --local op (__ksi_original_fish_prompt) - # print all but last element of the list, each followed by a new line - set -q op[2] - and printf '%s\n' $op[1..-2] - # print the last component without a newline - printf '%s' $op[-1] - set --global __ksi_prompt_state prompt-end - echo -en "\e]133;B\a" - end - function __ksi_mark_output_start --on-event fish_preexec set --global __ksi_prompt_state pre-exec echo -en "\e]133;C\a"