Commit Graph
67 Commits
Author SHA1 Message Date
Kovid Goyal e71b9091a3 Dont rely on env -0 for bash either 2022-04-15 13:33:32 +05:30
Kovid Goyal aab6f3e450 ... 2022-04-14 17:28:41 +05:30
Kovid Goyal 829ed0ec0d Fix #4964 2022-04-14 17:20:30 +05:30
Kovid Goyal 3ddea42660 ... 2022-04-13 22:45:36 +05:30
Kovid Goyal 1dec5f2e08 Help message for clone-in-kitty 2022-04-13 21:38:33 +05:30
Kovid Goyal 88d597f6b2 Dont define clone-in-kitty in POSIX mode
POSIX mode doesnt allow - in identifiers
2022-04-13 20:55:00 +05:30
Kovid Goyal d0c0b01724 Get clone-in-kitty working for bash as well 2022-04-13 20:38:04 +05:30
Kovid Goyal 7788f48dd5 Ensure IFS is correct when iterating over KITTY_SHELL_INTEGRATION 2022-04-12 23:03:05 +05:30
Kovid Goyal d0398dca28 Bash shell integration: Fix yet another inconsistent use of SYS_BASHRC
Why Linux distros are constitutionally incapable of using consistent
names and values for anything is beyond me.

Fixes #4934
Fixes #4935
2022-04-07 17:54:52 +05:30
Kovid Goyal 0dff455ffa declare oldval local 2022-03-30 11:57:46 +05:30
Kovid Goyal 81739288e8 handle multiple trailing spaces and semi-colons 2022-03-30 11:54:06 +05:30
Kovid Goyal 5641668bc1 Bash integration: Handle existing PROMPT_COMMAND ending with a literal newline 2022-03-30 10:44:59 +05:30
pagedown a765d551e4 Fix bash integration cwd reporting missing hostname 2022-03-23 19:29:18 +08:00
Kovid Goyal f982e754e4 Enable CWD reporting in bash integration 2022-03-15 15:37:17 +05:30
pagedown 4aea64261e ... 2022-03-07 20:56:02 +08:00
pagedown cf0cd9acd9 Remove trailing semicolons 2022-03-07 20:53:35 +08:00
pagedown b4b0bdc853 DCS @ kitty-print should be output to STDERR 2022-03-07 20:49:18 +08:00
pagedown 0b2837fcfa Fix bash integration debug log printing 2022-03-07 20:43:14 +08:00
pagedown 5f3d90e411 ... 2022-03-07 12:39:49 +08:00
pagedown 817ac82968 Detect SSH sessions without affecting performance
Exclude local runs by KITTY_PID.
Check KITTY_WINDOW_ID to detect connections via ssh kitten.
Check SSH via who -m with the integration manually installed and sudo.
2022-03-07 12:00:55 +08:00
Kovid Goyal 795953a341 get rid of the who -m ssh session test
I dont like executing a binary in a fast startup script. Lets see
if there are a lot of sessions in the wild that dont use the SSH_TTY
env var
2022-03-06 15:47:08 +05:30
Kovid Goyal f6706a55ec ... 2022-03-05 09:20:08 +05:30
Kovid Goyal e469b46ce5 Avoid calling who is either of SSH_TTY or SSH2_TTY are defined 2022-03-04 21:40:24 +05:30
Kovid Goyal 0a2b09da40 Prevent inject loop 2022-03-04 21:12:41 +05:30
Kovid Goyal c02d578468 Nicer error message if bash version < 4
macOS has bash 3
2022-03-04 20:59:22 +05:30
Kovid Goyal e990d233e5 ooops 2022-03-04 20:54:26 +05:30
Kovid Goyal a7cdcfcc16 Bash integration: Prevent shell integration code from running twice if user enables both automatic and manual integration 2022-03-04 20:48:57 +05:30
pagedown c8313409ff Explicitly call bash builtin 2022-03-04 19:36:38 +08:00
Kovid Goyal da30536709 bash/zsh integration: Show hostname in title when in an SSH session 2022-03-04 11:13:59 +05:30
Kovid Goyal 8c7ffc90f3 Fix the default bash HISTFILE changing to .sh_history instead of .bash_history
Fixes #4765
2022-02-28 20:06:48 +05:30
Kovid Goyal ef5c66ee17 Dont bother with new escape code for setting title
Since we are only sending the last command, it cannot have CSI
sequences in it anyway except in extremely contrived situations, so just
strip all ctrl chars out.
2022-02-27 10:55:02 +05:30
Kovid Goyal 33abd31d1a ... 2022-02-27 10:48:52 +05:30
Kovid Goyal 30146007d3 Avoid extra tr invocation 2022-02-27 10:23:04 +05:30
Kovid Goyal d53f8f24c4 Fix #4757
Still have to do the fix for zsh/fish
2022-02-27 10:20:19 +05:30
Kovid Goyal 27f3a5e16a Fix previous PR breaking bash integration 2022-02-23 12:30:02 +05:30
pagedown 444a690a86 Remove the extra comment line 2022-02-23 14:37:45 +08:00
pagedown 3d7b3f7d72 Use the official project name of Bash 2022-02-23 14:21:13 +08:00
pagedown 741ef7f115 Remove new lines with bash 2022-02-23 14:09:13 +08:00
pagedown e0c84c7176 Use bash builtin 2022-02-23 14:01:47 +08:00
pagedown 393425e3d1 Remove trailing spaces 2022-02-23 13:59:39 +08:00
Kovid Goyal c47f41cfc0 Add tests for bash startup file sourcing 2022-02-23 08:35:24 +05:30
Kovid Goyal d4f4d56f94 DRYer 2022-02-22 21:32:33 +05:30
Kovid Goyal 0108037076 Dont leak the ENV environ var we use to load our integration script into the shell 2022-02-22 21:29:32 +05:30
Kovid Goyal 88091b4ab3 BASH integration: No longer modify .bashrc to load shell integration
I think I have things setup robustly so that the shell integration
is loaded transparently via env vars and the normal bash startup files
are sourced, in the same way that vanilla bash does it. Let's hope I
haven't overlooked something.
2022-02-22 21:24:51 +05:30
Kovid Goyal dac9b07f16 bash shell integration: Handle both literal and escaped newlines in PS1 2022-02-22 18:30:20 +05:30
Kovid Goyal 05617f7dca strip kitty markup from ps1 before checking for newlines 2022-02-22 11:40:09 +05:30
Kovid Goyal 2d2f4b9ba9 Multi-line processing of bash prompts should only be done when the prompt actually contains a newline 2022-02-21 22:54:10 +05:30
Kovid Goyal 9bfa4553a8 Shell integration: bash: Fix rendering of multiline prompts with more than two lines
Fixes #4681
2022-02-11 06:08:34 +05:30
Kovid Goyal dc6138d286 Add a note about why we check _ksi_prompt_command 2022-02-08 19:52:02 +05:30
Kovid Goyal 7457f637a2 bash shell integration: Dont call _ksi_prompt_command from PROMPT_COMMAND unlessit is set 2022-02-08 19:48:30 +05:30