Commit Graph

1038 Commits

Author SHA1 Message Date
Kovid Goyal
97bce7be18
and again 2022-08-01 19:03:01 +05:30
Kovid Goyal
5d2a276172
... 2022-08-01 19:03:01 +05:30
Kovid Goyal
762dfe8315
increase timeout since signal delivery on CI is flakey 2022-08-01 19:03:01 +05:30
Kovid Goyal
1c0d1ec8a9
wait for child events explicitly 2022-08-01 19:03:01 +05:30
Kovid Goyal
e650699217
py3.8 compat 2022-08-01 19:03:01 +05:30
Kovid Goyal
5ff2b5be1c
Clear out any signals before ending test 2022-08-01 19:03:01 +05:30
Kovid Goyal
f1841d7c81
DRYer 2022-08-01 19:03:01 +05:30
Kovid Goyal
751a52153d
Restore python signal handlers properly after the test 2022-08-01 19:03:01 +05:30
Kovid Goyal
61b733bae9
Add a test for SIGCHLD on SIGTSTP 2022-08-01 19:03:01 +05:30
Kovid Goyal
624e96df9b
wrapper process should exit with signal if prewarmed worker exits with signal 2022-08-01 19:03:01 +05:30
Kovid Goyal
a3f1a44d83
OK I give up I cant get signal delivery to work reliably 2022-08-01 19:03:01 +05:30
Kovid Goyal
ed1547938e
When running tests ensure the signal mask is empty for processes run in the testing pty 2022-08-01 19:03:01 +05:30
Kovid Goyal
9379853d47
Get the SIGINT test working on macOS 2022-08-01 19:03:01 +05:30
Kovid Goyal
6ccfebd9e3
... 2022-08-01 19:03:01 +05:30
Kovid Goyal
b7d3d64975
Ignore error condition on master fd of testing pty 2022-08-01 19:03:00 +05:30
Kovid Goyal
0841be7803
Test sigwinch handling 2022-08-01 19:03:00 +05:30
Kovid Goyal
285c399ae5
... 2022-08-01 19:03:00 +05:30
Kovid Goyal
8998970adc
Make the socket prewarm test a bit more robust 2022-08-01 19:03:00 +05:30
Kovid Goyal
d080bf3b9c
Forward termination signals 2022-08-01 19:02:59 +05:30
Kovid Goyal
4154926be7
Get the test to pass on macOS 2022-08-01 19:02:59 +05:30
Kovid Goyal
dc84e3de67
Do not hang forever waiting for child death 2022-08-01 19:02:59 +05:30
Kovid Goyal
dfec88ed15
Inherit full outside env 2022-08-01 19:02:59 +05:30
Kovid Goyal
af1c48e0f7
Dont rely on having source of test modules available 2022-08-01 19:02:58 +05:30
Kovid Goyal
a6c3c57d40
Test stdio redirection with socket prewarm 2022-08-01 19:02:58 +05:30
Kovid Goyal
de9263a117
Verify uid/gid of connection from a prewarm client 2022-08-01 19:02:58 +05:30
Kovid Goyal
7b7f1ecc54
Add basic tests for socket prewarm 2022-08-01 19:02:58 +05:30
Kovid Goyal
1aa50b73a1
Allow pixel based adjustments as well 2022-07-15 11:45:43 +05:30
Kovid Goyal
ee931a17b0
Start work on option to modify font characteristics
Implement parsing of the option
2022-07-15 08:54:53 +05:30
Kovid Goyal
57d3d09679
DRYer 2022-07-13 19:49:40 +05:30
Kovid Goyal
d6492264c7
Bash integration: Fix declare not creating global variables in .bashrc
Fixes #5254
2022-07-08 18:55:04 +05:30
Kovid Goyal
a8b756f040
ssh kitten: A new option :code:--symlink-strategy to control how symlinks are copied to the remote machine
Fixes #5249
2022-07-03 14:03:56 +05:30
pagedown
6c80cd040c
Fix missing last line when getting output of the running command 2022-07-02 12:33:58 +08:00
Kovid Goyal
7e3bd8586f
Dont use SIGTSTP and SIGCONT in the test as they are very flaky 2022-06-13 20:29:58 +05:30
Kovid Goyal
d5df301317
Finer grained polling 2022-06-13 19:41:40 +05:30
Kovid Goyal
628246c3da
Workaround for python 3.8 that doesnt have the CLD_* constants 2022-06-13 19:22:37 +05:30
Kovid Goyal
d228acd30a
Use a busy loop for signaled process 2022-06-13 19:11:29 +05:30
Kovid Goyal
18cd97d914
Skip SIGSTSTP test when CLD_STOPPED is not available 2022-06-13 19:05:49 +05:30
Kovid Goyal
5f13946bac
Allow using our signal handlers in python event loops via an fd
pythons signal fd only return signal numbers not the full siginfo struct
2022-06-13 18:52:23 +05:30
Kovid Goyal
da6faa656c
Use a fork() without exec() to create prewarm process
This has the advantages:

1) Even first kitten use is fast
2) Computer has to do less work overall since prewarm process is itself prewarmed
2022-06-12 18:06:51 +05:30
Kovid Goyal
2dd1201c3f
Dont use a kitten for prewarm 2022-06-09 06:53:51 +05:30
Kovid Goyal
6afbdbe94f
Use correct kitty config in prewarmed process 2022-06-07 12:53:39 +05:30
Kovid Goyal
061a0c8cb6
Reset global options object in the tests 2022-06-07 10:58:03 +05:30
Kovid Goyal
bf6c90a69a
Compare realpaths for cwd test 2022-06-06 20:46:49 +05:30
Kovid Goyal
98f46f8bd7
Start work on prewarming
The prewarm process and its controller are implemented with some basic
tests.
2022-06-06 20:39:36 +05:30
Kovid Goyal
fc217dafba
Merge branch 'master' of https://github.com/suvayu/kitty 2022-06-06 16:55:08 +05:30
Kovid Goyal
a6aff817cf
Prepare for prewarm testing 2022-06-06 15:59:34 +05:30
Suvayu Ali
38cb18fe92 diff kitten: tests for directory walking 2022-06-06 11:01:45 +02:00
Kovid Goyal
e12a9f3caf
Iosevka: Fix incorrect rendering when there is a combining char that does not group with its neighbors
Fixes #5153
2022-06-01 12:00:53 +05:30
Kovid Goyal
6405849a1b
Bash integration clone test was accidentally running zsh
Fixes #5144
2022-05-29 08:46:06 +05:30
Kovid Goyal
e9340dfaaf
Some more tests for last non empty command output 2022-05-28 15:22:17 +05:30
Kovid Goyal
0509855930
Allow getting the last non-empty command output easily via an action or remote control
Fixes #4973
2022-05-28 15:19:24 +05:30
Kovid Goyal
27906ea853
Skip login shell detection when login shell is set to nologin 2022-05-28 08:09:30 +05:30
Kovid Goyal
eb84990f5a
Fix #5110 2022-05-19 09:55:12 +05:30
Kovid Goyal
58333f260b
Fix spurious error print in test 2022-05-13 17:42:00 +05:30
Kovid Goyal
2b3be147e6
Allow three combining chars per cell
Makes use of otherwise wasted padding in the CPUCell struct
2022-04-28 09:45:34 +05:30
Kovid Goyal
775584b5a5
Use literal quoting for env vars sent over ssh by clone 2022-04-15 14:34:21 +05:30
Kovid Goyal
e71b9091a3
Dont rely on env -0 for bash either 2022-04-15 13:33:32 +05:30
Kovid Goyal
b866c3e783
Add a zsh test for clone env serialization 2022-04-15 12:04:50 +05:30
Kovid Goyal
a1bfcd9fc5
Also transfer env vars when cloning over ssh kitten 2022-04-13 20:08:06 +05:30
Kovid Goyal
93a7b220c9
Fix parsing of quoted words 2022-04-12 19:31:56 +05:30
Kovid Goyal
8f92c594f2
Create a search query parser 2022-04-12 19:26:25 +05:30
Kovid Goyal
e66c732b41
Forgot to adjust test for new mouse encoding 2022-04-07 17:23:23 +05:30
Kovid Goyal
bae9b095b4
Start work on kitty launcher for remote servers
This will automatically download kitty and run it. The ssh kitten
can add it to PATH thereby making kitty available on the remote machine
at low cost.
2022-04-03 15:10:20 +05:30
pagedown
276ba7754a
Add ssh kitten URL test 2022-03-23 20:08:50 +08:00
Kovid Goyal
0a5c16363c
Fix continued lines not having their continued status reset on line feed
Fixes #4837
2022-03-16 15:20:25 +05:30
Kovid Goyal
0a2768e496
Split up the bootstrap script to keep its size down 2022-03-16 07:17:12 +05:30
pagedown
621453b068
... 2022-03-16 01:33:23 +08:00
pagedown
150bf1a5b0
Reduce bootstrap script length by removing comments and indents
dropbear has 9000 bytes limit on ssh arguments length.
2022-03-16 01:03:51 +08:00
pagedown
7160027c14
Use the fish built-in function name to report current working directory
If the feature is enabled by fish in the future, it will override the
built-in one and there will be no duplicate reporting.
2022-03-16 01:03:26 +08:00
Kovid Goyal
c95dca4023
See if we can make the test more robust 2022-03-15 20:38:02 +05:30
Kovid Goyal
47b3c37bf0
Add cwd reporting to fish integration 2022-03-15 20:25:39 +05:30
Kovid Goyal
190666dc8a
Check that non-ascii paths work in cwd reporting 2022-03-15 20:16:09 +05:30
Kovid Goyal
f982e754e4
Enable CWD reporting in bash integration 2022-03-15 15:37:17 +05:30
Kovid Goyal
4a1ad7755a
Enable CWD reporting in the zsh integration 2022-03-15 14:30:21 +05:30
Kovid Goyal
54c5faa12d
Simplify hostname matching
Now that we load the opts upfront, we can have load_config return the
final opts object itself
2022-03-15 11:25:21 +05:30
Kovid Goyal
441ea7d696
askpass.py should be executable 2022-03-13 14:49:36 +05:30
Kovid Goyal
2b06ca5e1a
ssh kitten: Send data without a roundtrip
Send data to the remote side without waiting for a data request. Avoids
an extra roundtrip during initialization.
2022-03-13 13:55:30 +05:30
Kovid Goyal
e1504c4775
Avoid needing to initialize tty state in bootstrap scripts 2022-03-13 13:55:30 +05:30
Kovid Goyal
b2e74e4830
Switch to using the hostname from the CLI for settings
This removes the need to wait for data from the remote machine
before sending data to it.
2022-03-13 13:55:30 +05:30
Kovid Goyal
f3088c5646
Only try to chmod runtime dir if actually needed 2022-03-13 13:45:03 +05:30
Kovid Goyal
920086ae88
unlink SHM file at end of each individual test 2022-03-10 10:57:36 +05:30
Kovid Goyal
708c5126b9
Return the data cookie settings when generating the bootstrap script 2022-03-09 22:18:04 +05:30
Kovid Goyal
5dde31f80c
DRYer 2022-03-09 11:52:36 +05:30
Kovid Goyal
3bb869f725
Also test launching of bootstrap.py 2022-03-09 11:32:14 +05:30
Kovid Goyal
6df78fa67c
Add tests with different shells used as launchers 2022-03-09 11:29:06 +05:30
Kovid Goyal
53b1607c4d
When testing ssh kitten launch the bootscrapt script the same way sshd does it 2022-03-09 11:25:02 +05:30
Kovid Goyal
c9071a66ca
ssh kitten: Add an option to change the cwd at login 2022-03-07 12:24:37 +05:30
Kovid Goyal
d4d4e00f9d
Merge branch 'ksi' of https://github.com/page-down/kitty 2022-03-07 11:18:15 +05:30
Kovid Goyal
68df13d3fe
Fix recursive definitions in env vars not expanded 2022-03-07 11:07:26 +05:30
pagedown
1b68e41db4
Remove the fish integration prompt end B prompt marking
Currently kitty does not use the B prompt marking.
This is consistent with the zsh and bash implementations.
Improve compatibility with most user configurations.
2022-03-07 12:12:52 +08:00
Kovid Goyal
2404eba11f
ssh kitten: Passthrough to ssh if run outside of kitty
Also, ensure that the ssh data request is only served if it is received
over the tty of the correct kitty window.
2022-03-07 06:48:18 +05:30
Kovid Goyal
75d5e386d3
Make the integration tests more strict
Actually assert that there are/are not prompt marking bytes in the data
received by the pty
2022-03-06 15:35:24 +05:30
Kovid Goyal
7f9fec061a
bootstrap.py is now tested the same as bootsstrap.sh 2022-03-06 14:26:15 +05:30
Kovid Goyal
4552a474b7
Make the no-integration test more comprehensive and stronger 2022-03-06 12:23:11 +05:30
Kovid Goyal
c713dc0ca8
Allow using a --kitten argument with the ssh kitten to make it easier to override settings from ssh.conf 2022-03-06 10:07:46 +05:30
Kovid Goyal
01dd0416ac
Add an option to control the login shell 2022-03-05 11:16:15 +05:30
Kovid Goyal
0c79561977
Fix the ssh_copy test on macOS 2022-03-04 21:31:13 +05:30
pagedown
7c166e2194
Try to make the fish vi cursor test more stable 2022-03-04 23:46:39 +08:00
pagedown
d236b34fd4
Shell integration: Fix running bash non-interactively
In POSIX mode, bash does not perform ENV with non-interactive shell, so
the mode cannot be recovered. Check the arguments and do not change the
execution environment.
2022-03-04 19:47:44 +08:00
Kovid Goyal
e797ba4800
Allow matching on hostname and username 2022-03-04 12:42:31 +05:30
Kovid Goyal
1c558be524
Port HISTFILE fix to ssh bash launcher 2022-03-03 21:24:45 +05:30
Kovid Goyal
7d653cb7bf
Allow copying the same file to multiple locations 2022-03-03 21:24:45 +05:30
Kovid Goyal
b4cc38a1d9
Fix symlink extraction over ssh 2022-03-03 21:24:45 +05:30
Kovid Goyal
8867317b6a
Allow transferring files outside of HOME 2022-03-03 21:24:45 +05:30
Kovid Goyal
e06bd68379
Split up ssh tests 2022-03-03 21:24:45 +05:30
Kovid Goyal
ae6665493a
Implement setting of env vars 2022-03-03 21:24:44 +05:30
Kovid Goyal
53c8485a7a
Get env conf working with tests 2022-03-03 21:24:44 +05:30
Kovid Goyal
02a68e7541
Pass the value of shell_integration in the tarfile
Allows per host overrides and also avoids needing to read kitty.conf in
the ssh kitten
2022-03-03 21:24:44 +05:30
Kovid Goyal
6e5dbc5285
Test for handling of leading data 2022-03-03 21:24:44 +05:30
Kovid Goyal
e1f5ef59c8
Remove integration tests with login_shell=''since that is tested explicitly before 2022-03-03 21:24:44 +05:30
Kovid Goyal
44baeb6924
Run login_shell detection tests with all available shells 2022-03-03 21:24:44 +05:30
Kovid Goyal
c00e8b1709
Add tests for the individual login_shell detection functions 2022-03-03 21:24:44 +05:30
Kovid Goyal
55ede897b9
faster fail 2022-03-03 21:24:43 +05:30
Kovid Goyal
a71e7d7eb1
Simplify data transmission 2022-03-03 21:24:43 +05:30
Kovid Goyal
22c1ee7dc8
Cannot call the parser from callbacks that are themselves called from the parser 2022-03-03 21:24:43 +05:30
Kovid Goyal
d452a5cdce
... 2022-03-03 21:24:43 +05:30
Kovid Goyal
78b553e55e
Add tests for turning off shell integration in the bootstrap script 2022-03-03 21:24:43 +05:30
Kovid Goyal
8ca3a511cc
Get the ssh bootstrap tests fully working 2022-03-03 21:24:43 +05:30
Kovid Goyal
bf26a3f569
Skip bash if its too old when testing bootstrap script 2022-03-03 21:24:43 +05:30
Kovid Goyal
ddb8753548
Work on enabling shell integration over ssh 2022-03-03 21:24:43 +05:30
Kovid Goyal
e73525d0a2
Start work on testing the bootstrap script 2022-03-03 21:24:43 +05:30
Kovid Goyal
4279f20daf
Dont depend on the default bash prompt when testing 2022-03-03 21:24:42 +05:30
Kovid Goyal
2dd7c3b939
More work on ssh bootstrap 2022-03-03 21:24:42 +05:30
Kovid Goyal
d8ed42ae8e
Move setting of ZLE_RPROMPT_INDENT to zshrc which will hopefully prevent it being overriden 2022-03-03 19:16:44 +05:30
Kovid Goyal
297592242c
Fix #4782
Presumably the failure is caused by zsh not having finished drawing the
prompt when the cursor shape is changed. So instead wait till the
expected prompt is drawn. There are probably more places where this
change needs to be made, which I cant tell since I cant reproduce.
2022-03-03 17:22:42 +05:30
Kovid Goyal
e103b280fd
Add test for HISTFILE 2022-02-28 20:09:54 +05:30
pagedown
2d4f7e3446
Disable system startup files in zsh integration test with --noglobalrcs 2022-02-27 20:21:05 +08:00
Kovid Goyal
165c1240a9
Make the test a little more robust 2022-02-27 11:04:12 +05:30
Kovid Goyal
f91463a494
Also add test for handling of control chars in zsh title reporting 2022-02-27 10:47:23 +05:30
Kovid Goyal
d53f8f24c4
Fix #4757
Still have to do the fix for zsh/fish
2022-02-27 10:20:19 +05:30
pagedown
e2f16ff624
Add fish pipestatus integration tests and changelog entries 2022-02-27 00:27:31 +08:00
Kovid Goyal
b212fd5bcd
Dont actually need a thread for PTY 2022-02-24 10:05:13 +05:30
Kovid Goyal
0a297f4656
proper ordering during shutdown 2022-02-24 00:27:09 +05:30
Kovid Goyal
fa397a1d24
PTY: Write to child in separate thread 2022-02-24 00:26:08 +05:30
Kovid Goyal
0610daaec7
Remove echo dance 2022-02-24 00:08:17 +05:30
Kovid Goyal
8278e2b88d
Dont fail test in no PATH in environ 2022-02-23 23:27:24 +05:30
Kovid Goyal
cb4a9d89cf
Cleanup linenum matching and add some tests 2022-02-23 23:06:19 +05:30
Kovid Goyal
12e011c481
Merge branch 'test-ksi-fish' of https://github.com/page-down/kitty 2022-02-23 18:31:13 +05:30
Kovid Goyal
668783ba1c
Use a version check when skipping bash test 2022-02-23 18:27:20 +05:30
pagedown
c18ebef702
... 2022-02-23 20:49:32 +08:00
Kovid Goyal
03f9f29ce4
DRYer 2022-02-23 18:14:40 +05:30
pagedown
9c05481f14
... 2022-02-23 20:05:30 +08:00
pagedown
c0f6201ac3
Add fish shell integration tests 2022-02-23 19:55:19 +08:00
Kovid Goyal
fc9645832d
Add tests for --noprofile, --rcfile, --norc as well 2022-02-23 10:42:25 +05:30
Kovid Goyal
c47f41cfc0
Add tests for bash startup file sourcing 2022-02-23 08:35:24 +05:30
Kovid Goyal
e28aae620a
Add tests for reset of cursor shape when running commands 2022-02-23 07:48:42 +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
4487462b0d
bash assumes ECHO is enabled for the tty 2022-02-22 20:43:58 +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
b59212696a
Skip testing bash on macOS as it is too old 2022-02-22 14:53:46 +05:30
Kovid Goyal
7fe1376e34
DRYer 2022-02-22 14:52:54 +05:30
Kovid Goyal
e25b90c1b6
Add bash integration tests 2022-02-22 12:23:19 +05:30
Kovid Goyal
cb32a0b8fc
Handle remote print callback in tests 2022-02-22 11:47:44 +05:30
Kovid Goyal
65c7ecbc30
Test prompt drawing after screen is shrunk 2022-02-21 21:17:52 +05:30
Kovid Goyal
da5e37620e
Also test changing of title when running command 2022-02-21 21:17:52 +05:30
Kovid Goyal
261057396c
Fix zsh integration test on CI
Also, add various other robustness improvements to the test
2022-02-21 21:17:41 +05:30
Kovid Goyal
a43f610555
Better error msg when cursor is not changed 2022-02-21 18:23:35 +05:30
Kovid Goyal
45ae52e5d0
Fix assert ordering 2022-02-21 18:07:54 +05:30
Kovid Goyal
a565443d4a
Saner tempdir removal 2022-02-21 18:05:36 +05:30
Kovid Goyal
081d6a3f16
Install various shells ON CI so we can test with them 2022-02-21 18:00:23 +05:30
Kovid Goyal
c9cc832875
Add basic tests for zsh shell integration 2022-02-21 17:57:25 +05:30
Kovid Goyal
b28d94ac97
Always use kitty as the python interpreter to run in the tests 2022-02-21 14:45:12 +05:30
Kovid Goyal
b9684879e7
Try to fix tests failing on CI 2022-02-21 14:24:08 +05:30
Kovid Goyal
63f974531b
Framework for testing with external programs via a PTY 2022-02-21 14:08:10 +05:30
Kovid Goyal
711f8b024e
Properly sanitize pagerhist when returning as plain text 2022-02-15 22:11:57 +05:30
Kovid Goyal
80202d2679
Fix show_last_command_output not working when the output is stored partially in the scrollback pager history buffer
Fixes #4435
2022-02-15 13:04:02 +05:30
Kovid Goyal
5d120a2f36
Output prompt marking when serializing to ANSI 2022-02-15 08:57:17 +05:30
Kovid Goyal
1170cf474f
A new action copy_ansi_to_clipboard to copy the current selection with ANSI formatting codes
Fixes #4665
2022-02-10 12:20:19 +05:30
Kovid Goyal
b5a2f94185
The open_actions() test needs options set 2022-01-24 15:21:32 +05:30
Kovid Goyal
17a3be8cb1
Merge branch 'dotted-dashed-underline' of https://github.com/jcla1/kitty 2022-01-18 21:03:30 +05:30
Joseph Adams
da486153de Add (possibly erroneous) test for new underline.
Also make more clear *what* exactly is rendered in the cell (i.e. a
strikethrough).
2022-01-18 12:52:59 +01:00
Joseph Adams
dd192ad0b7 Make old tests run
Previously, because of the new underline styles a couple of tests were
failing due to an unexpected number of sprites being returned from the
test-set-up. No new tests were added.
2022-01-18 12:28:24 +01:00
pagedown
ce6f99044e
... 2022-01-16 04:14:59 +08:00
pagedown
30b81d98f1
Add tests for finding command output 2022-01-16 04:10:16 +08:00
Kovid Goyal
362c4147e4
... 2022-01-08 12:21:55 +05:30
Kovid Goyal
1454af2d41
macOS: Allow customizing the launch actions 2022-01-07 18:43:07 +05:30
Kovid Goyal
384b2f8462
Add roundtrip and cursor positioning tests for all three zero width chars 2022-01-05 08:57:14 +05:30
Kovid Goyal
e45697f78a
Fix a regression that broke rendering of unicode regional indicators
At some point, unicode regional indicators became combining chars in the
unicode standard, which broke the handling of them in draw_codepoint().
The fix has the added advantage of improving performance in the common
case by only checking for combining chars. The flag check happens only
if the first check matches.

Fixes #4407
2021-12-31 09:28:47 +05:30
Kovid Goyal
8699f90fa4
Now have sphinx types on dev machine 2021-12-23 10:13:16 +05:30
Kovid Goyal
62dbc1129c
When setting the OS Window title strip out CSI escape codes
Fixes #4325
2021-12-08 16:04:23 +05:30
Kovid Goyal
0c274a9a0b
Parse actions on demand
This removes the startup cost of parsing hundreds of default actions
when action_alias or kitten_alias are used. Although the cost is on the
order of 1ms, this design feels cleaner and gives nicer debug config
output.
2021-11-29 21:51:42 +05:30
Kovid Goyal
16b4a4fa80
Forgot to change test for new zsh shell integration code 2021-11-27 07:49:32 +05:30
Kovid Goyal
2ca13e886a
Avoid cyclic infinite recursion
Note that this means that any alias is only expanded once per action
2021-11-23 15:36:58 +05:30
Kovid Goyal
a97a05b1ec
Allow action_alias to work with any action 2021-11-23 14:43:36 +05:30
Kovid Goyal
ee2520e036
Also prevent infinite recursion in kitten_alias 2021-11-23 07:53:40 +05:30
Kovid Goyal
d7f569b341
Add a test for recursion 2021-11-22 22:54:21 +05:30
Kovid Goyal
89069407d2
Make action_alias recursive 2021-11-22 22:15:04 +05:30
Kovid Goyal
ec5165d958
Fix action_alias not working when used with arguments 2021-11-22 21:41:55 +05:30
Kovid Goyal
aa4fa4cc85
Allow defining aliases for more general actions, not just kittens
Fixes #4260
2021-11-22 19:52:43 +05:30
Kovid Goyal
81467c2e7e
... 2021-11-20 07:36:52 +05:30
Kovid Goyal
f0e8ab8f31
Drop support for python 3.6
It is being EOLed next month (https://www.python.org/dev/peps/pep-0494/)
which is when I expect the next kitty release as well
2021-11-18 22:44:41 +05:30
Kovid Goyal
6afaec1d62
Use a single function for getting command output 2021-11-15 15:17:34 +05:30
pagedown
f3dd2a8bfd
Get the first command output on screen and the last scrolled one 2021-11-15 15:17:33 +05:30
Kovid Goyal
c43637f6cc
Dont copy prompt start bits to multiple lines when resizing the screen
This makes it unnecessary to modify the prompt marking protocol to
distinguish consecutive prompts without output in between
2021-11-07 18:00:06 +05:30
Kovid Goyal
950edb1110
Fix symlink transmission 2021-11-05 13:18:58 +05:30
Kovid Goyal
c4b3723372
More work on file transfer 2021-11-05 13:10:04 +05:30
Luflosi
bb5ded4e65
Don't rely on nanosecond resolution when testing mtime transmission
Commit 85cea78b3c missed a couple instances where the mtime was not a multiple of 1µs.
See https://github.com/kovidgoyal/kitty/issues/4175.
2021-11-01 21:06:23 +01:00
Kovid Goyal
85cea78b3c
Use 13000 when testing mtime transmission as there exist some systems with a 1000ns resolution. See #4175 2021-10-31 19:13:55 +05:30
Luflosi
e82e57a30c
Remove unused code
Since 99d9cb0b0d runs all tests with HOME set to a temporary directory, this code setting the cache directory to a temporary directory is no longer needed. `cache_dir()` will choose a directory in the home directory if neither KITTY_CACHE_DIRECTORY or XDG_CACHE_HOME are set.
2021-10-31 11:42:55 +01:00
Kovid Goyal
d03f4dbc98
More work on file transfer 2021-10-30 16:54:27 +05:30
Kovid Goyal
ee852cf5fc
More work on file transmission 2021-10-29 21:52:49 +05:30
Kovid Goyal
820a893d75
More work on file transfer 2021-10-29 15:01:31 +05:30
Kovid Goyal
2443dc135c
Use a faster implementation of the Color type
Now implemented in C
2021-10-28 11:15:13 +05:30
Kovid Goyal
b51be8382f
Transmit home directory when sending so filenames can be resolved
Also only send metadata if permission granted by user
2021-10-21 20:06:53 +05:30
Kovid Goyal
6546c1da9b
run pyupgrade to upgrade the codebase to python3.6 2021-10-21 12:43:55 +05:30
Kovid Goyal
8f0b3983ee
Apparently only importlib_resources has actually deprecated contents() 2021-10-20 11:15:51 +05:30
Kovid Goyal
7f2ce045ab
Handle deprecation of importlib.resources APIs 2021-10-19 09:14:58 +05:30
Kovid Goyal
5f91084968
More work on file transfer 2021-10-18 13:02:37 +05:30
Kovid Goyal
706494016c
More work on file transmission 2021-10-14 18:29:02 +05:30
Kovid Goyal
563b7ad2d0
Linux binary builds: Fix Pygments not being included 2021-10-11 20:00:56 +05:30
Kovid Goyal
fbf47f75d5
Fix soft hyphens not being preserved when round tripping text through the terminal
Also roundtrip all characters in the Cf category.

Characters with the DI (Default Ignorable) property are now
preserved but not rendered and treated as zero-width
as per the unicode standard.
See https://www.unicode.org/faq/unsup_char.html
2021-10-07 12:44:22 +05:30
Kovid Goyal
498d3d5906
More cleanups 2021-10-05 11:58:06 +05:30
Kovid Goyal
57152a8e29
Fix utmp test 2021-10-05 11:41:18 +05:30
Matt Fellenz
1d4a86594b
Add tests for UTMP methods 2021-10-04 20:49:48 -07:00
Kovid Goyal
df1ecad7e9
Fix failing test
Ignore progress messages in the tests
2021-10-03 12:01:41 +05:30
Kovid Goyal
01299421ee
Fix typo causing test to fail 2021-10-02 11:07:34 +05:30
Kovid Goyal
5729e33412
librsync actually blocks on output buffer size as well as input availability. So handle that 2021-10-02 09:26:35 +05:30
Kovid Goyal
e6cff61f99
Move management of destination file completely into PatchFile 2021-10-01 14:29:14 +05:30
Kovid Goyal
7d41aca0e4
More word selection direction change fixes 2021-09-27 20:42:22 +05:30
Kovid Goyal
c71d8fe1cc
Fix #4070 2021-09-27 17:29:22 +05:30
Kovid Goyal
3bc7b5bad9
Remote file transfer: Fix transfer not working is custom ssh port or identity is specified on the SSH command line
Fixes #4067
2021-09-27 10:58:40 +05:30
Kovid Goyal
259ca4a11e
Speed up parsing of file transfer OSC codes
Avoid roundtrips between unicode and bytes objects
2021-09-25 14:05:21 +05:30
Kovid Goyal
17e95cb615
Add a test for rsync roundtrip 2021-09-19 20:55:00 +05:30
Kovid Goyal
b5c086aedb
... 2021-09-19 20:25:08 +05:30
Kovid Goyal
f0fab80f5b
Start work on rsync support for file transfers 2021-09-17 13:41:45 +05:30
Kovid Goyal
5ce71506c8
Various minor fixes in nightly pipeline 2021-09-16 22:31:43 +05:30
Kovid Goyal
d042ea5ab9
Split up tranfer kitten code into modules 2021-09-16 13:47:12 +05:30
Kovid Goyal
5f32d2e56f
Uppercase DELETE_ENV_VAR 2021-09-16 10:16:33 +05:30
Kovid Goyal
5b716df45f
We dont need a special class for delete_env_var 2021-09-16 09:53:54 +05:30
Kovid Goyal
66e2e60ac4
Allow deleting environment vars from the child environment using env 2021-09-16 08:43:17 +05:30
Kovid Goyal
6993c905e3
Disallow empty ids in file transfer commands 2021-09-13 09:53:59 +05:30
Kovid Goyal
31ead3f088
Basic file transfer works for sending 2021-09-12 10:02:23 +05:30
Kovid Goyal
9db9638bc3
Soak up protocol responses after a cancel to avoid outputting garbage to the shell after the kitten exits 2021-09-11 10:48:40 +05:30
Kovid Goyal
f9c99a61d4
More work on file transfer 2021-09-09 12:59:31 +05:30
Kovid Goyal
745e97e0ab
Send a started response after each dest file is registered 2021-09-08 09:59:45 +05:30
Kovid Goyal
af5c0b3b71
More work on transmission kitten 2021-09-08 08:56:14 +05:30
Kovid Goyal
40786427b0
More work on file transmission 2021-09-01 09:22:04 +05:30
Kovid Goyal
161a54ceaa
Disable transmission tests pending rewrite 2021-08-30 08:08:41 +05:30
Kovid Goyal
075b4d252a
DRYer 2021-08-24 07:49:12 +05:30
Kovid Goyal
1953ecdf4d
Add tests for container transmission 2021-08-23 22:10:26 +05:30
Kovid Goyal
d9cc1d67c0
Make path comparison more robust 2021-08-23 11:48:21 +05:30
Kovid Goyal
d178f4c75d
Implement canceling of file transmission 2021-08-23 11:33:03 +05:30
Kovid Goyal
0668a3bf2a
Send a response indicating transmission was successful 2021-08-23 11:09:45 +05:30
Kovid Goyal
d548b21be2
Allow interleaving file transmissions 2021-08-22 22:08:03 +05:30
Kovid Goyal
780e526143
Use a union for cell attributes
Cleaner code, no performance impact
2021-08-18 10:06:08 +05:30
Kovid Goyal
bffe7aba8f
Add shell integration scripts to kitty package 2021-08-18 10:06:05 +05:30
Kovid Goyal
07b971ad5f
Add a shortcut to easily browse the output of the last command run in the shell 2021-08-18 10:06:04 +05:30
Kovid Goyal
bd5f100f13
Add test for multiline prompt jumping 2021-08-18 10:06:04 +05:30
Kovid Goyal
3b8da7e4c2
implementation of scroll_to_prompt 2021-08-18 10:06:04 +05:30
Kovid Goyal
f0e7344bc8
Use bundled CA certs on Linux binary builds as well
Makes it consistent with macOS
2021-08-16 22:47:53 +05:30
Kovid Goyal
aa525c68c7
Only test bundled CA certs on macOS 2021-08-16 22:26:10 +05:30
Kovid Goyal
5966f04656
Add a build test for CA certificate loading 2021-08-16 20:44:47 +05:30
Kovid Goyal
dbc7e8e85d
When dragging word or line selections, ensure the initially selected item is never deselected
This matches behavior in most other programs
Fixes #3930
2021-08-13 20:23:43 +05:30
Kovid Goyal
e1ed9aca10
clear_all_mouse_shortcuts -> clear_all_mouse_actions 2021-08-07 21:34:16 +05:30
bdeshi
db5a2d2141
add clear_all_mouse_shortcuts option to clear mouse_maps 2021-08-07 21:33:56 +06:00
Kovid Goyal
ca1b2454bd
Fix position output in matcher 2021-08-07 10:45:50 +05:30
Kovid Goyal
d6a6cbe153
Migrate import in test 2021-08-05 07:05:19 +05:30
Kovid Goyal
419cf78984
A new remote control command to resize OS Windows 2021-07-25 22:57:00 +05:30
Kovid Goyal
8f214c51c0
Get rid of kitty's special OSC 52 protocol
A better solution from an ecosystem perspective is to just work with the
original protocol. I have modified kitty's escape parser to special case
OSC 52 handling without changing its max escape code size.

Basically, it works by splitting up OSC 52 escape codes longer than the
max size into a series of partial OSC 52 escape codes. These get
dispatched to the UI layer where it accumulates them upto the 8MB limit
and then sends to clipboard when the partial sequence ends.

See https://github.com/ranger/ranger/issues/1861
2021-07-23 22:18:02 +05:30
Kovid Goyal
340159b591
Graphics protocol: Support for frame composition
Fixes #3809
2021-07-22 18:58:59 +05:30
Kovid Goyal
1d9626d493
Graphics protocol: Fix image without placements being deleted when screen scrolls 2021-07-10 14:05:53 +05:30
Kovid Goyal
05d0bda044
Allow selecting blanks at the start of the top line 2021-07-04 18:49:17 +05:30
Kovid Goyal
e732df46b8
Have right clicking to extend selection operate on the nearest selection boundary instead of the selection end. This matches both vim and xterm 2021-07-04 18:00:41 +05:30
Kovid Goyal
1ef895e246
When dumping commands dump stop_pending_mode at the correct place 2021-07-03 12:07:46 +05:30
Kovid Goyal
38ae370202
Fix #3789 2021-07-03 10:12:44 +05:30
Kovid Goyal
026d200add
Fix a bug in the implementation of the synchronized updates escape code that could cause incorrect parsing if either the pending buffer capacity or the pending timeout were exceeded
Fixes #3779
2021-07-01 15:32:53 +05:30
Kovid Goyal
e6a17f78b6
Use the main VT parser in pending mode as well
Should get much closer semantics in the two cases and its nice not to
have an extra mini VT parser for pending mode. There is a performance
hit in pending mode, since now the pending mode bytes are round tripped
via utf-8 decoding/encoding, but its worth it for the code
simplification.
2021-06-30 10:52:22 +05:30
Kovid Goyal
5768c54c5b
Add support for pending mode via SM/RM 2026
Because, why the hell not, it's not like I have an actual life.
More seriously, terminal-wg (aka Bikeshedder's Anonymous) is
pushing for it so it's likely at least one poor application writer
will fall for their propaganda.
2021-06-29 12:24:34 +05:30
Kovid Goyal
81411e6b54
Fix trailing parentheses in URLs not being detected
Also fix URLs starting near the end of the line not being detected.

Fixes #3688
2021-06-04 18:13:36 +05:30
Kovid Goyal
e01bb09e8c
Fix ligatures not working with the Iosevka font
Fixes #297
2021-06-04 12:18:17 +05:30
Kovid Goyal
af5ed093b8
Fix test failing on macOS 2021-05-31 17:54:57 +05:30
Kovid Goyal
6d7df1c5e8
Refactor configuration file parsing
Now the time for importing the kitty.config module has been halved, from
16ms from 32ms on my machine. Also, the new architecture will eventually
allow for auto generating a bunch of python-to-C boilerplate code.
2021-05-31 17:40:49 +05:30
Kovid Goyal
f7db9e3527
Move deprecated parsers into utils 2021-05-31 17:40:48 +05:30
Kovid Goyal
248631a1a8
Add tests for conf parsing 2021-05-31 17:40:48 +05:30
Kovid Goyal
4d0d0b205d
Improve parser error messages a bit 2021-05-17 21:29:54 +05:30
Kovid Goyal
6dcc09a96f
Port mouse selection tests to new framework 2021-05-11 11:49:44 +05:30
Kovid Goyal
efb0f6f24a
Fix a regression in 0.20.0 that sent incorrect bytes for the F1-F4 keys in rmkx mode
Fixes #3586
2021-05-07 15:09:42 +05:30
Kovid Goyal
33287115de
Support infinite length ligatures 2021-05-07 06:59:24 +05:30
Kovid Goyal
33de0f821f
Use uthash for the sprite position cache 2021-05-07 06:58:54 +05:30
Kovid Goyal
5cf228e362
Fix tab activity tracking not working unless there is some other activity in tab bar as well
Fixes #3571
2021-05-05 14:30:16 +05:30
Kovid Goyal
b32c346eed
A new protocol extension to unscroll the screen
See https://gitlab.freedesktop.org/terminal-wg/specifications/-/issues/30
2021-04-23 15:44:38 +05:30
Kovid Goyal
a7c5b8c634
Fix #3471 2021-04-13 09:53:57 +05:30
Kovid Goyal
76fca0641e
Fix memory leak in utf_8_strndup test 2021-04-10 13:39:04 +05:30
Kovid Goyal
82d11b80dd
Add a test for filling from scrollback with large continued line 2021-04-09 17:04:55 +05:30
Ravi R Kiran
fdfba4ea04 Fix pyflakes failures 2021-03-30 14:57:41 -05:00
Ravi R Kiran
953253de99 Implementation of hyper and meta 2021-03-30 14:23:17 -05:00
Kovid Goyal
d28caf15b2
More glyph grouping fixes 2021-03-25 14:06:16 +05:30
Kovid Goyal
7c7933efa9
Fix #3416 2021-03-24 13:17:38 +05:30
Kovid Goyal
11268ffa16
Fix marking of text not working on lines that contain zero cells
Zero cells are passed to the regex engine as spaces, so they must
increment the match_pos counter. Fixes #3403
2021-03-23 10:04:58 +05:30
Kovid Goyal
83bbcf0aa1
Graphics protocol: Add a control to allow clients to specify that the cursor should not move when displaying an image
Fixes #3411
2021-03-22 22:16:40 +05:30
Kovid Goyal
ccafdacc6f
Ensure cursor position is correct when filling line buffer 2021-03-18 10:39:08 +05:30
Kovid Goyal
0f3ff4e2d9
Scrollback filling should happen after cursor position is finalized 2021-03-17 21:59:11 +05:30
Kovid Goyal
071986138b
Cleanup previous merge 2021-03-17 13:43:26 +05:30
Eddie Lebow
b76491ba82
Add tests for scrollback_fill_enlarged_window 2021-03-15 23:58:11 -04:00
Kovid Goyal
9fdaef1da6
Graphics protocol: Fix suppression of responses not working for chunked transmission
Now the starting escape codes q value is used unless the last escape
code specifies a non-zero q value of its own. Fixes #3375
2021-03-10 09:58:49 +05:30
Kovid Goyal
56fcbb95ab
Key encoding: in legacy mode use legacy encoding for a few more combinations
Some legacy terminal applications get confused seeing CSI u escape
codes. Since it is relatively common to press ctrl or shift and
space/enter/tab/backspace, emit the same bytes as traditional terminals
do for these common keys.
2021-02-21 11:14:25 +05:30
Kovid Goyal
6a901ea048
Forgot that wayland is not built on CI 2021-02-19 18:09:12 +05:30
Kovid Goyal
dbc1ade5a9
Fallback to importlib_resources on python 3.6 2021-02-19 18:02:15 +05:30
Kovid Goyal
c2a924a5ea
Run all tests on the full frozen build using the frozen launcher
Much more comprehensive test coverage at the cost of slightly increasing
the frozen build size.
2021-02-19 17:57:59 +05:30
Kovid Goyal
e06d40cb31
Fix test suite getting type checked accidentally 2021-02-19 15:19:04 +05:30
Kovid Goyal
9cd8637e9c
Remove another use of __file__ 2021-02-19 14:49:07 +05:30
Kovid Goyal
38992e25d7
Make the tests into a package
Useful to make the tests runnable in a frozen build.
2021-02-19 14:35:25 +05:30
Kovid Goyal
625f0f77bb
Ensure disk cache is cleared 2021-02-19 09:43:57 +05:30
Kovid Goyal
0341b64748
Allow caching of disk cache entries in RAM 2021-02-18 10:22:42 +05:30
Kovid Goyal
ba005e991a
Improve handling of infinite length ligatures in newer versions of FiraCode and CascadiaCode.
Now such ligatures are detected based on glyph naming convention.
This removes the gap in the ligatures at cell boundaries. However, at
least in Fira Code the infinite length ligature glyphs define a negative
left side bearing. This means they overlap when drawn consecutively,
leading to unsightly bumps at the joins.

Fixes #2695
2021-02-15 15:49:09 +05:30
Kovid Goyal
912c46fc57
Fix rendering of ligatures in the latest release of Cascadia code
For some reason it puts empty glyphs after the ligature glyph rather than before it.
There is a possibility this fix might break something else, we will see.
Fixes #3313
2021-02-15 11:57:57 +05:30
Kovid Goyal
5675944c0c
Recognize remaining ASCII keys for legacy mode as well 2021-02-15 05:33:57 +05:30
Kovid Goyal
6b9c280214
Add a test for encoding of : as a legacy ascii key 2021-02-15 05:27:32 +05:30
Kovid Goyal
fe07306ff1
Use a nicer decorator for functions that only need to be run once 2021-02-05 10:40:52 +05:30
Kovid Goyal
4ba35d4a93
Clear cache_dir lru cache when testing 2021-02-05 09:56:17 +05:30
Kovid Goyal
67ca1902a0
Use a cache dir in the cwd on CI 2021-02-05 09:42:01 +05:30
Kovid Goyal
1ef326e220
Better error message 2021-02-05 09:29:56 +05:30
Kovid Goyal
7a1785e1e8
Get chunked loading working with frames 2021-02-04 21:04:44 +05:30
Kovid Goyal
19f0e2303d
Refactor to store frame deltas instead of fully coalesced frames
Trades CPU usage for cache/memory space
2021-02-03 15:49:33 +05:30
Kovid Goyal
bb5c5a8e4f
Allow gapless frames 2021-02-01 16:22:36 +05:30
Kovid Goyal
00edb6058e
Start work on implementing frame transitions
Also ensure that the correct OS Window is current when uploading images
to GPU.
2021-01-31 20:58:42 +05:30
Kovid Goyal
597267d1d0
root frame gap should be set to the gap of the first received frame 2021-01-31 20:58:42 +05:30
Kovid Goyal
b21850dd15
Implement updating of current frame on GPU 2021-01-31 20:58:42 +05:30
Kovid Goyal
4098f2d383
Add quota enforcement testing 2021-01-31 20:58:42 +05:30
Kovid Goyal
5eba754c60
Implement animation control escape codes 2021-01-31 20:58:42 +05:30
Kovid Goyal
1d20472759
Avoid a cache move when deleting frames 2021-01-31 20:58:42 +05:30
Kovid Goyal
d76e757d53
Implement delete for frames 2021-01-31 20:58:42 +05:30
Kovid Goyal
17f485d614
Basic frame loading works 2021-01-31 20:58:41 +05:30
Kovid Goyal
35f3312a1e
Use shorter cache keys 2021-01-31 20:58:41 +05:30
Kovid Goyal
ca3c49099f
Start work on tests for frame loading 2021-01-31 20:58:41 +05:30
Kovid Goyal
5a182d3d13
Store image data in a disk cache 2021-01-31 20:58:41 +05:30
Kovid Goyal
f9844ba3b0
Allow negative numbers in CSI codes 2021-01-21 07:06:43 +05:30
Kovid Goyal
e4d8aac3d5
Make CSI parsing a bit more spec compliant
Now the full list of secondary characters (intermediate bytes) is used from ECMA 48
Also the codes that accept only one parameter now report errors when
multiple parameters are passed.
2021-01-21 06:41:27 +05:30
Kovid Goyal
2a8e8d4b38
Fix #3252 2021-01-20 16:02:28 +05:30
Kovid Goyal
e6644aebcb
Add a test to ensure caps lock does not produce bytes in legacy mode 2021-01-19 09:19:34 +05:30
Kovid Goyal
39da92d8ab
Now that glfw reports shifted keys, use it when encoding key events 2021-01-17 11:14:44 +05:30
Kovid Goyal
cf04a5a036
Add tests for encode/decode roundtripping 2021-01-16 20:52:15 +05:30
Kovid Goyal
0163bf3edb
Fix enter/tab/backspace not being reported in all keys mode 2021-01-16 20:52:15 +05:30
Kovid Goyal
0714fd376b
Fix handling of ctrl key in legacy mode
Also change the glfw constants used for the modifiers to match those
used in the terminal encoding. Less likely to make mistakes translating
that way.
2021-01-16 20:52:14 +05:30
Kovid Goyal
39f41faf9f
Dont send events for modifier keys unless in all key mode 2021-01-16 20:52:14 +05:30
Kovid Goyal
c421fd56be
Ensure typing in shell works in disambiguate mode 2021-01-16 20:52:14 +05:30
Kovid Goyal
47a901385f
Implement reporting of all keys as escape codes with text 2021-01-16 20:52:13 +05:30
Kovid Goyal
819bd5cd70
Tests for alternate key reporting 2021-01-16 20:52:13 +05:30
Kovid Goyal
753ad68ca9
Add tests for event type reporting 2021-01-16 20:52:13 +05:30
Kovid Goyal
5498f4e526
... 2021-01-16 20:52:13 +05:30
Kovid Goyal
83a01b6bf4
Add tests for the disambiguate flag 2021-01-16 20:52:13 +05:30
Kovid Goyal
c519013b20
Add tests for legacy letter key encodings 2021-01-16 20:52:13 +05:30
Kovid Goyal
eeacac227a
Add tests for functional KP keys 2021-01-16 20:52:13 +05:30
Kovid Goyal
529e9f83f7
Finish up functional key tests 2021-01-16 20:52:13 +05:30
Kovid Goyal
1690718710
More removal of GLFW_KEY_ constants 2021-01-16 20:52:12 +05:30
Kovid Goyal
f06eee8fe1
Define special numbers in one place only 2021-01-16 20:52:12 +05:30
Kovid Goyal
a30ea2b7f8
Implement progressive enhancement of key event reporting 2021-01-16 20:52:12 +05:30
Kovid Goyal
d68c338304
Wait for write and check data, fixes test failure 2021-01-04 12:27:26 +05:30
Kovid Goyal
ac13ae727f
Fix failing test
We cant know what the size of the disk cache file is,
since defragmentation occurs asynchronously
2021-01-03 21:05:08 +05:30
Kovid Goyal
1b59a1c421
Finish tests of disk cache 2021-01-03 17:36:40 +05:30