Commit graph

1388 commits

Author SHA1 Message Date
Kovid Goyal
89570d3b52
ssh kitten: Fix KITTY_PUBLIC_KEY not being encoded properly when transmitting
Fixes #5496
2022-09-10 07:09:58 +05:30
Kovid Goyal
7e1380cc0d
Start work on giving GLFW a proper clipboard API 2022-09-08 12:45:34 +05:30
Kovid Goyal
5bf5454dbe
Nicer fix for #5469 2022-09-04 22:15:17 +05:30
Kovid Goyal
31fe35cd38
Fix #5469 2022-09-04 13:58:16 +05:30
Kovid Goyal
295743a96e
Fix ref to launch doc 2022-09-02 16:31:21 +05:30
Kovid Goyal
9cec924f32
hints kitten: Allow using launch as the program to run, to open the result in a new kitty tab/window/etc.
Fixes #5462
2022-09-02 16:23:00 +05:30
Kovid Goyal
afada84f52
Cleanup previous PR
Use wcswidth() for line width calculation. Works with emoji and ignores
escape codes automatically. Add changelog entry.
2022-08-31 08:01:52 +05:30
Trygve Aaberge
03720402a7 Fix hints sometimes matching next line as part of URL
For URLs where there's fewer characters left to the right edge of the
window than the number of escape characters in the line, the next line
would be included in the URL, as if the URL went all the way to the
right edge.

For example with a 40 chars wide terminal, if you run:

    echo -e '\e[31m1\e[m https://github.com/kovidgoyal/kitty\ntest'

And launch the hints kitten, you'll see that test on the next line will
be included in the URL.

This happened because the calculation for filling the rest of the line
with NUL characters counted the escape characters as well as the visible
characters, so it filled in too few characters.

This is a regression introduced in commit 91966712.
2022-08-30 22:24:58 +02:00
Kovid Goyal
fca0999814
Eureka! Figured out why libedit is breaking in prewarm on macOS via launchd
The prewarm zygote imports the world. shell.py had a top level import
for readline. Which means readline was being imported pre-fork. And of
course as is traditional with Apple libedit is not fork safe. Probably
because it initializes its internal IO routines based on the stdio
handles at time of import which are the handles kitty gets from launchd
2022-08-30 19:35:17 +05:30
Kovid Goyal
78056c659c
Another place we cant use readline on macOS 2022-08-30 19:27:55 +05:30
Kovid Goyal
d8e43a3412
macOS: Fix regression in 0.26.0 that caused asking the user for a line of input such as for set_tab_title to not work
Apparently libedit doesn't work in the forked process when the parent
process is run via Launch Services. I cant be bothered to investigate
why, given that libedit is closed source. macOS users will just have to
live without history/completion in the ask kitten until I get around to
writing a replacement for readline/libedit.

And on a personal note, macOS >> Necrotizing fasciitis

Fixes #5447
2022-08-30 16:45:14 +05:30
Kovid Goyal
89a2545855
Cleanup previous PR
Allow disabling hyperlinking of rg output. Also parse
--kitten=hyperlink=... form of CLI args.
2022-08-30 07:41:14 +05:30
Charlie Groves
db5b4da388 Add options for linking different parts of ripgrep output 2022-08-29 13:23:42 -04:00
Charlie Groves
f5a70adf0b Add a --hyperlink-only-matches flag to hyperlinked_grep
If it's active, only matching lines get links, not file headers or context lines.
2022-08-26 17:05:50 -04:00
Kovid Goyal
e330c38d4a
ssh kitten: Delegate to ssh when -T is used
Fixes #5411
2022-08-24 15:23:41 +05:30
pagedown
0f4cb1955f
Use the plus sign to connect shortcut keys consistently 2022-08-18 17:05:00 +08:00
Kovid Goyal
bfcd324993
ask kitten: allow having hidden text in the message 2022-08-16 13:57:58 +05:30
Kovid Goyal
d0c50248ea
Graphics protocol: Only delete temp files if they have the string tty-graphics-protocol in their file paths.
This prevents deletion of arbitrary files in /tmp via the graphics
protocol.
2022-08-16 11:25:33 +05:30
Kovid Goyal
6961845167
ask kitten: fix button click area offset vertically 2022-08-16 10:35:51 +05:30
Kovid Goyal
cd3eeb7a95
Center choice message correctly when it is multi-line
Also fix button wrap calculation. It was not taking the borders into
account.
2022-08-10 20:34:25 +05:30
Kovid Goyal
7be6b28011
Preserve blanks lines and per line formatting in the ask kitten for the message with choices 2022-08-10 20:10:17 +05:30
Kovid Goyal
1a643441f3
Make the kitty public key available as an env var to child processes 2022-08-10 12:36:04 +05:30
pagedown
5f180dbd9a
... 2022-08-09 12:29:22 +08:00
pagedown
9f1c9529aa
Allow completion for show_key kitten
Use the lowercase form of kitty.
2022-08-09 12:15:48 +08:00
pagedown
0d116e6ef0
Use four spaces to indent 2022-08-08 22:31:55 +05:30
pagedown
06108d66b1
Replace tab with four spaces indent 2022-08-08 22:31:55 +05:30
Kovid Goyal
3463931dad
Rewrite clipboard kitten to only change termios settings while it is actually reading from terminal 2022-08-02 17:14:27 +05:30
Kovid Goyal
132f87d152
show_key: use a better representation of the space key when 2022-08-01 13:25:56 +05:30
Kovid Goyal
e2117ee8a4
ssh kitten: Allow completion of ssh options between the destination and command
This contravenes the documented command line parsing behavior of ssh but
matches its actual implementation. Sigh.

Fixes #5322
2022-07-29 08:29:49 +05:30
Kovid Goyal
54d2f06abe
remote files kitten: Fix working with files whose names have characters that need to be quoted in shell scripts
Fixes #5313
2022-07-26 08:06:25 +05:30
Kovid Goyal
d9371dc265
ssh kitten: Better handling of exit on keyboard interrupt 2022-07-20 21:40:51 +05:30
Kovid Goyal
ef2a12fbdf
Ignore sigint while draining the tty 2022-07-20 19:40:23 +05:30
Kovid Goyal
7215c6d6be
ssh kitten: Allow pressing Ctrl-C to abort ssh before the connection is completed
Fixing this involved adding a new mode to kitty where it handles
ctrl-c/z/q by sending signals to the tty foreground process group
instead of delegating to the kernel to do that. Since the pipe may be
full we have no way of knowing when the kernel will get around to
reading the signal byte. So send the signal ourselves.

Fixes #5271
2022-07-20 19:11:14 +05:30
Kovid Goyal
bd9e1f58fe
ssh kitten: Make discarding of garbage data after ssh fails more robust
We now roundtrip an UUID via the terminal and only exit after receiving
it back. This guarantees that any pending data in the pipe is discarded.
2022-07-20 13:28:51 +05:30
Kovid Goyal
3a17f54bca
Add a note about how to exclude directories in the copy command 2022-07-12 16:23:48 +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
Kovid Goyal
b3fcb53625
ssh kitten: Allow ssh kitten to work from inside tmux, provided the tmux session inherits the correct KITTY env vars
Fixes #5227
2022-06-29 18:40:22 +05:30
Kovid Goyal
4f29dea8ef
Utility function to detect when running inside tmux 2022-06-29 17:51:38 +05:30
pagedown
c3df6d2fe3
Remove executable perms from kitten files 2022-06-28 11:59:47 +08:00
Kovid Goyal
a89e1b5573
Fix horizontal wheel events not being reported to client programs when they grab the mouse
Fixes #2819
2022-06-18 06:47:42 +05:30
Kovid Goyal
2dd1201c3f
Dont use a kitten for prewarm 2022-06-09 06:53:51 +05:30
Kovid Goyal
9be68966b4
Also detect ssh kitten run as an overlay 2022-06-08 18:53:54 +05:30
Kovid Goyal
9dbafcc368
Remove unneccessary argument to connection_sharing_args() 2022-06-07 20:40:01 +05:30
Kovid Goyal
9f5f113840
... 2022-06-07 13:05:07 +05:30
Kovid Goyal
6afbdbe94f
Use correct kitty config in prewarmed process 2022-06-07 12:53:39 +05:30
Kovid Goyal
cc3c7b0286
Fix waitpid() call on python 3.8 2022-06-06 21:22:04 +05:30
Kovid Goyal
4c9a75c1ba
Remove unused code 2022-06-06 20:45:40 +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
79f7954048
Cleanup previous PR 2022-06-06 17:19:52 +05:30
Kovid Goyal
fc217dafba
Merge branch 'master' of https://github.com/suvayu/kitty 2022-06-06 16:55:08 +05:30
Suvayu Ali
20b6a97159 Update in response to feedback
- one configuration option: ignore_paths
- use shlex to parse option to support whitespace and in-line comments
- change option type to Tuple[str, ...]
- remove ignored directories from dirnames to prevent scanning
2022-06-06 11:00:45 +02:00
Kovid Goyal
98f6e24106
Move block outside try/except as it doesnt need to be in there 2022-06-06 08:17:15 +05:30
Kovid Goyal
cd7751681d
hints kitten: Fix surrounding quotes/brackets and embedded carriage returns not being removed when using line number processing
Fixes #5170
2022-06-05 18:07:16 +05:30
Suvayu Ali
eea652f1d0 kittens/diff: move empty pattern check to dir tree walk 2022-06-05 10:11:21 +02:00
Suvayu Ali
fbf1ec43c7 diff kitten: add options to ignore paths when comparing directories
Tested locally & over SSH:

    $ kitty +kitten diff /local/path /local/path2
    $ kitty +kitten diff /local/path ssh:remote:/path
2022-06-05 00:11:30 +02:00
Kovid Goyal
0828096e9e
... 2022-06-03 18:30:14 +05:30
Kovid Goyal
ebcbed290f
Make loading of kitty options in kitten re-useable 2022-06-03 17:49:58 +05:30
Kovid Goyal
55eeb9c11e
Dont import kitty.complete in ssh.main 2022-06-02 08:08:33 +05:30
James Reid
0b79cbdb3b
Add "user" tab to themes kitten
Add new tab named "user" to the built-in themes kitten - new tab
filters and displays only user-defined color themes, identified by
adding "is_user_defined" property to "Theme" class which defaults
to False, and is set True when a theme is fetched using the
"load_from_dir" method.
2022-05-30 19:25:09 +01:00
James Reid
1dc6b49e02
Remove hard coded tab string in ThemesHandler
Remove hard coded tab string and replace with self.tabs, which is
a reference to the same tab string defined in the __init__ of
ThemesHandler
2022-05-30 19:17:07 +01:00
Kovid Goyal
8540ca3990
Workaround for nix package messing with kitty file permissions 2022-05-28 08:03:17 +05:30
Kovid Goyal
ea8bed2a71
Fix #5113 2022-05-20 20:45:08 +05:30
Jakub Kuczys
a9a9ec80b5
Support the short pretty flag (-p) in hyperlinked_grep kitten 2022-05-20 10:57:42 +02:00
Kovid Goyal
bba1455e28
Dont import all of the ssh kitten just to detect commandlines 2022-05-18 15:58:06 +05:30
Kovid Goyal
1b4cf1fea7
Remote file kitten: Integrate with the ssh kitten 2022-05-14 10:31:18 +05:30
Kovid Goyal
aaffec1cbc
Better error message 2022-05-13 19:25:37 +05:30
Kovid Goyal
99409f0a8b
Merge branch 'docs' of https://github.com/page-down/kitty 2022-04-30 14:41:12 +05:30
Kovid Goyal
9811d677e5
query terminal kitten: Return fast when run in non-kitty terminals 2022-04-30 14:25:39 +05:30
pagedown
6c1f20bb27
Docs: Mention close_shared_ssh_connections in ssh kitten config docs 2022-04-30 16:54:46 +08:00
Kovid Goyal
4a7125ec92
ssh kitten: Suppress error prints about invalid items in kitty.conf
Fixes #4985
2022-04-29 20:39:32 +05:30
pagedown
bb78dc5ccb
Docs: Fix the help text of query_terminal and other minor tweaks
Use --match-tab in broadcast kitten example.
2022-04-29 01:30:45 +08:00
Kovid Goyal
1a2d9c6fba
Fix a couple of issues highlighted by updated mypy 2022-04-28 07:03:35 +05:30
pagedown
510022c3c1
Docs: Improve the documentation for kittens
Add more text roles and links.
Add an example that broadcasts only to other windows in the current tab.
Initial capitalization of the key names in the kbd text role.
Add Python type hints for custom kittens.
Note about hyperlink support for ls on macOS.
Add description text for show_key.
2022-04-27 16:14:54 +08:00
Kovid Goyal
627c79ffbb
Show detailed traceback when using show_error() 2022-04-26 13:58:57 +05:30
Kovid Goyal
ee94114eb2
Fix #5016 2022-04-26 08:20:24 +05:30
pagedown
7282f1f684
Docs: Improve ssh kitten documentation
Add more text roles.
Put the env example at the end.
The alias syntax of fish and bash requires quotation marks.
Document `SSH_ASKPASS` in the glossary.
2022-04-25 15:36:37 +08:00
pagedown
288d16f7be
Docs: Minor tweaks to the help documentation of hints kitten 2022-04-24 17:18:45 +08:00
Kovid Goyal
6174c2008f
... 2022-04-20 10:10:05 +05:30
Kovid Goyal
402fac3edf
... 2022-04-19 10:53:18 +05:30
Kovid Goyal
b45fedd794
Infrastructure for serializing env blocks 2022-04-16 22:16:20 +05:30
Kovid Goyal
aab9482e31
... 2022-04-15 15:01:13 +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
bde468594e
ssh kitten: handle newlines in env vars 2022-04-15 12:49:35 +05:30
Kovid Goyal
a1bfcd9fc5
Also transfer env vars when cloning over ssh kitten 2022-04-13 20:08:06 +05:30
Kovid Goyal
dd331ca12e
ssh kitten: Allow changing terminal colors when connecting 2022-04-08 12:10:59 +05:30
Kovid Goyal
c3b23679f3
Make some themes code re-useable 2022-04-08 11:33:50 +05:30
Kovid Goyal
de12dddbef
Better error message when ripgrep is not found 2022-04-06 16:38:18 +05:30
Kovid Goyal
8ff841f1ac
... 2022-04-04 15:34:07 +05:30
Kovid Goyal
709c4abb53
Do not do automatic upgrades of remote kitty
Can be disruptive, since upgrading outputs to the terminal.
Instead updating can be triggerred manually with kitty update-kitty
2022-04-04 14:51:49 +05:30
Kovid Goyal
c07f164154
Implement an option to control the installation of the kitty bootstrap script 2022-04-03 20:30:16 +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
Kovid Goyal
e522095fae
... 2022-03-26 07:39:16 +05:30
pagedown
746cb3684a
Eliminate flickering when hints kitten exits 2022-03-25 22:53:38 +08:00
pagedown
16c6545e93
Report overlay ready in case of no match 2022-03-25 22:52:35 +08:00
Kovid Goyal
15e3e8d8b1
typo 2022-03-25 16:18:00 +05:30
pagedown
98369db7f5
Unset shell integration env var before exec command 2022-03-24 22:01:11 +08:00
pagedown
5c02c370d4
ssh kitten: Allow to configure HOME environment variable
Useful if the user does not have a home directory or the directory is
not writable.
2022-03-24 22:00:41 +08:00
Kovid Goyal
3c67e991c2
Allow defining actions to take when pasting
Fixes #4873
2022-03-24 17:22:46 +05:30
Kovid Goyal
ff80b906d0
Report full traceback when highlighting fails 2022-03-24 11:39:31 +05:30
Kovid Goyal
6b13454091
... 2022-03-24 09:50:50 +05:30
Kovid Goyal
9eae4ad913
... 2022-03-24 09:37:13 +05:30
Kovid Goyal
bfb8532c52
Jump through the hoops needed to ensure error reporting is done in case of early termination of kittens that use overlay ready notifications 2022-03-24 08:49:36 +05:30
pagedown
276ba7754a
Add ssh kitten URL test 2022-03-23 20:08:50 +08:00
pagedown
4309aa1ace
ssh kitten: Fix SSH URL hostname matching 2022-03-23 18:39:27 +08:00
Kovid Goyal
6ef83a09d3
Avoid clearing the screen when exiting a kitten as its not needed any more 2022-03-23 16:06:38 +05:30
Kovid Goyal
6dc1617429
Avoid flicker when starting kittens such as the hints kitten
Fixes #4674
2022-03-23 15:55:11 +05:30
Kovid Goyal
1be1864657
Allow sending more than a screenful of output from a kitten
Also Fixes #4866
2022-03-23 14:33:53 +05:30
pagedown
ff8a99211d
Docs: Unify and generalize the terms remote computer, machine and host 2022-03-22 23:26:15 +08:00
pagedown
efda0ea455
Docs: Categorize the ssh kitten configuration options and minor tweaks 2022-03-22 23:25:59 +08:00
pagedown
1962519666
Only write to the OpenSSH version sentinel file once 2022-03-17 22:23:48 +08:00
Kovid Goyal
0a2768e496
Split up the bootstrap script to keep its size down 2022-03-16 07:17:12 +05:30
pagedown
576ab24609
Preserve line breaks to keep the line numbers in error messages 2022-03-16 08:58:50 +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
Kovid Goyal
82de6a1c56
DRYer 2022-03-15 22:12:49 +05:30
Kovid Goyal
1fbb4f763e
Only check OpenSSH version once on a machine if it is new enough 2022-03-15 22:09:40 +05:30
Kovid Goyal
20582431d6
typo 2022-03-15 21:50:55 +05:30
Kovid Goyal
8c6e7ce61a
... 2022-03-15 20:11:27 +05:30
Kovid Goyal
04ead526b9
Presend data on slave connections since for these SSH does not use the TTY 2022-03-15 20:09:05 +05:30
Kovid Goyal
ce1e22ac95
Have *_with_cwd work with the ssh kitten to open new windows auto-logged into the remote server at the current remote working directory 2022-03-15 19:59:16 +05:30
Kovid Goyal
a216f6bd46
ssh doesnt use askpass even if DISPLAY is set
It only uses askpass if not connected to a terminal
2022-03-15 17:27:57 +05:30
Kovid Goyal
c47e5372b5
native askpass should be used when requested 2022-03-15 15:54:48 +05:30
Kovid Goyal
daa673eff1
Make usage of need_to_request_data clearer 2022-03-15 15:51:49 +05:30
Kovid Goyal
5099dd6aa3
Only use kitty's askpass if DISPLAY is set or OpenSSH is new enough to support SSH_ASKPASS_REQUIRE 2022-03-15 15:47:02 +05:30
Kovid Goyal
7168ceab94
Make askpass a choice var 2022-03-15 13:14:53 +05:30
Kovid Goyal
868d57b818
... 2022-03-15 12:00:17 +05:30
Kovid Goyal
6057c57ea4
Fix garbage removal pafter SSH failure not working on macOS when run more than once 2022-03-15 11:57:28 +05:30
Kovid Goyal
e8437fd435
Make reading garbage more robust 2022-03-15 11:51:46 +05:30
Kovid Goyal
9e317971b4
Simplify garbage clear logic 2022-03-15 11:41:59 +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
9b0bd81661
Ignore hostname directives when using overrides 2022-03-15 10:38:03 +05:30
Kovid Goyal
52da68876d
Use a zero mtime for data.sh
Its a temp file and that way no chance of the time being in the future
2022-03-15 10:30:15 +05:30
pagedown
8e03da855f
diff kitten: Fix wrong number of scrolling lines after context switch 2022-03-14 20:29:15 +08:00
Kovid Goyal
942881d1b7
Add a ntoe about the importance of askpass 2022-03-14 16:44:12 +05:30
Kovid Goyal
2a50203fcd
... 2022-03-14 13:44:18 +05:30
Kovid Goyal
90561682cf
Make using kitty askpass optional 2022-03-14 11:38:31 +05:30
Kovid Goyal
be8bfbe370
Refactor launch sequence in preparation for optionising it 2022-03-14 10:40:07 +05:30
Kovid Goyal
f7e4447b66
Dont transmit sensitive data unless actually needed 2022-03-13 15:43:14 +05:30
Kovid Goyal
df4e58bc39
Improve disposal of garbage data on ssh failure 2022-03-13 15:37:46 +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
74f0057ec8
Dont change tty state to raw
Just turn off echo. Makes the code much simpler, can just use shell
builtin POSIX read function.
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
f54a3e8036
Make requesting data optional 2022-03-13 13:55:30 +05:30
Kovid Goyal
ea74add814
ssh kitten: Restore terminal state after running ssh 2022-03-12 15:48:52 +05:30
Kovid Goyal
ba1b3c3c2d
Fix mypy failures 2022-03-12 08:28:43 +05:30
Kovid Goyal
d5c48ddb94
Allow inputting fingerprint check 2022-03-12 08:23:10 +05:30
Mena Jacobs
c8a258f36b Fix icat fail on mac with --print-window-size
passing tty as TextIOWrapper to screen_size_function results in a TypeError since the screen_size_function expects an int. calling fileno() on tty gives us the desired int. This also fixes the kitty matplotlib backend, if MPLBACEND_KITTY_SIZING is not set to manual
2022-03-12 02:17:01 +01:00
Kovid Goyal
14e0b01b40
Echo asterisks when inputting the password 2022-03-11 16:44:08 +05:30
Kovid Goyal
76de99a5a8
Use a custom askpass implementation
Keeps OpenSSH from using the tty hopefully allowing us to start sending
data without needing to wait for the remote side to request it.
2022-03-11 16:44:08 +05:30
Kovid Goyal
5bb6b29ca3
Allow controlling the prompt used to input the password 2022-03-11 16:44:08 +05:30
Kovid Goyal
61558d518e
Get askpass basically working 2022-03-11 16:44:08 +05:30
pagedown
740e787f54
... 2022-03-11 17:28:29 +08:00
pagedown
bd87d50948
Remove the ssh folder in cache_dir 2022-03-11 16:47:03 +08:00
pagedown
d3c0c422a5
Add user uid suffix to tmp runtime dir symlink 2022-03-11 15:42:52 +08:00
Kovid Goyal
f080871911
Update the idiotic design symlink atomically 2022-03-11 07:54:16 +05:30
Kovid Goyal
c9ef5c0715
Avoid a race in creating the idiotic_design symlink 2022-03-11 07:37:44 +05:30
Kovid Goyal
f2d6ba8775
Workaround for socket path too long on macOS 2022-03-10 22:50:26 +05:30
Kovid Goyal
f774841ee0
More robust copying of terminfo
Dont use symlinks in the tarball, instead create them
in the bootstrap scripts, only if needed.
2022-03-10 21:08:20 +05:30
Kovid Goyal
c23e04fd03
DRYer 2022-03-10 15:37:10 +05:30
Kovid Goyal
f67009f554
Flush the write to shm explicitly 2022-03-10 15:01:58 +05:30
Kovid Goyal
31d9db7e74
Use XDG_RUNTIME_DIR to store control master sockets
On Linux this has the advantage that the dir is auto cleaned on reboot
2022-03-10 12:51:21 +05:30
Kovid Goyal
384c56f834
When using control masters also enable keep alives
Prevents the master connection from becoming stale. Use ssh protocol
keep alives rather than tcp ones as tcp ones are often blocked by
firewalls and also spoofable.
2022-03-10 11:48:36 +05:30
Kovid Goyal
920086ae88
unlink SHM file at end of each individual test 2022-03-10 10:57:36 +05:30
Kovid Goyal
4c392426f6
Get shared memory based data transfer working 2022-03-10 10:46:04 +05:30
Kovid Goyal
20962d989f
Use POSIX shm to pass ssh data to kitty 2022-03-10 06:55:21 +05:30
Kovid Goyal
aa4d36cc57
Use secrets to generate the random password 2022-03-10 06:11:58 +05:30
Kovid Goyal
8d119f06b3
Force restrictive permissions on file used to pass ssh data to kitty 2022-03-10 05:30:47 +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
577de9f746
ssh kitten: Start work on connection sharing
Basic sharing works. Now investigate if we can eliminate the round-trip
latency by transmitting the data without waiting for the start message
when using a shared connection
2022-03-09 19:27:38 +05:30
Kovid Goyal
38a70f5b51
... 2022-03-09 15:31:19 +05:30
Kovid Goyal
118306a9ff
Avoid an extra process hanging around when running the interpreter on the remote machine 2022-03-09 15:29:57 +05:30
pagedown
d29fa7b382
ssh kitten: Add FreeBSD tcsh (csh) support
Replace line feeds and exclamation marks for tcsh compatibility.
2022-03-09 16:11:58 +08:00
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
2341a27f63
... 2022-03-08 23:05:42 +05:30
Kovid Goyal
0661caf9da
DRYer 2022-03-08 23:04:58 +05:30
Kovid Goyal
5b5bd77c53
ssh kitten: Fix not working when user's login shell is fish 2022-03-08 22:39:31 +05:30
Kovid Goyal
958ebb72a6
DRYer 2022-03-08 20:48:37 +05:30
Kovid Goyal
febc5c53a6
Get the python interpreter working with non-POSIX login shells 2022-03-08 20:44:29 +05:30
Kovid Goyal
6e921300e2
Let ssh concat the cli args for us 2022-03-08 19:49:25 +05:30
Kovid Goyal
5e457da30b
Only use bz2 compression if bzip2 is available 2022-03-07 20:44:26 +05:30
Kovid Goyal
855718b179
ssh kitten: match hostnames against both remote hostname and hostname used on the command line to connect to it 2022-03-07 20:32: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
b0ea960159
Dont use --no-same-owner when extracting tar archives
This flag is missing on OpenBSD and is the default on other platforms
when extracting as non-root. Make the uname/gname taringo field empty so
when extracting as root files will always be owned by root.
2022-03-07 12:10:45 +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
397fbe7ad3
Avoid unnecessary which and fix typos 2022-03-07 11:30:12 +08:00
Kovid Goyal
6ff69c88df
... 2022-03-07 06:58:14 +05:30
Kovid Goyal
6e4d3c98da
Ensure pw file is cleaned up on kitten exit
This way it is cleaned up even if ssh fails
2022-03-07 06:54:11 +05:30
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
7f9fec061a
bootstrap.py is now tested the same as bootsstrap.sh 2022-03-06 14:26:15 +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
31ea5d74a7
Exclude junk directories when adding user files as well 2022-03-06 10:00:02 +05:30
Kovid Goyal
31b01d42c0
use inherited instead of inherit 2022-03-06 09:54:33 +05:30
Kovid Goyal
675411df85
Start work on python bootstrap 2022-03-05 15:43:55 +05:30
Kovid Goyal
ffa79d731c
Allow configuring the ssh kitten via env vars 2022-03-05 12:29:55 +05:30
Kovid Goyal
01dd0416ac
Add an option to control the login shell 2022-03-05 11:16:15 +05:30
Kovid Goyal
0bd1676978
Some cleanup 2022-03-05 10:58:42 +05:30
Kovid Goyal
f3407959a6
Start work on python bootstrap script 2022-03-05 10:54:21 +05:30
Kovid Goyal
e797ba4800
Allow matching on hostname and username 2022-03-04 12:42:31 +05:30
Kovid Goyal
fe27ee2d79
Allow configuring the interpreter to use on the remote host 2022-03-04 12:18:27 +05:30
Kovid Goyal
e0c984046c
EXEC_CMD must come after login_shell detection since it can use login_shell 2022-03-04 10:00:12 +05:30
Kovid Goyal
64d6337612
... 2022-03-04 09:54:17 +05:30
Kovid Goyal
499b30d175
Allow specifying multiple matching hostnames 2022-03-04 07:23:35 +05:30
Kovid Goyal
ef9adc92c8
Note on how to use include for DRYer config 2022-03-04 07:13:56 +05:30
Kovid Goyal
f1ce8c0e8a
Add some docs for the ssh kitten 2022-03-03 22:37:24 +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
4b6bfaffba
More work on ssh copy 2022-03-03 21:24:45 +05:30
Kovid Goyal
fadae42715
Work on parsing copy instructions 2022-03-03 21:24:45 +05:30
Kovid Goyal
77c9affc00
Start work on copy instructions 2022-03-03 21:24:45 +05:30
Kovid Goyal
e5ba15949b
$size doesnt need to be global 2022-03-03 21:24:45 +05:30
Kovid Goyal
a3e59697a1
... 2022-03-03 21:24:45 +05:30
Kovid Goyal
95da414511
Avoid one record read 2022-03-03 21:24:45 +05:30
Kovid Goyal
c0d5ace640
Prevent invalid root paths 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
c6f37afeff
Add config to control shell integration per host 2022-03-03 21:24:44 +05:30
Kovid Goyal
59f656e3ca
Allow controlling where on the remote computer the ssh kitten installs its data 2022-03-03 21:24:44 +05:30
Kovid Goyal
12658c4756
Make ssh data start request transmission more robust 2022-03-03 21:24:44 +05:30
Kovid Goyal
37c185462a
Handle error messages form terminal during bootstrap 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
846021296f
Start work on config infrastructure for ssh kitten 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
fda9415873
Use a record separator to delimit the start of data
Needed because the user could press keys and send data to the tty
before kitty can send the ssh data
2022-03-03 21:24:44 +05:30
Kovid Goyal
99d0c2d846
Get reading data working on macOS 2022-03-03 21:24:43 +05:30
Kovid Goyal
a71e7d7eb1
Simplify data transmission 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
f37d947dd5
more work on ssh data transmission 2022-03-03 21:24:42 +05:30
Kovid Goyal
2dd7c3b939
More work on ssh bootstrap 2022-03-03 21:24:42 +05:30
pagedown
16298e49c7
Update Unicode input kitten names 2022-03-03 16:45:07 +08:00
Kovid Goyal
f421666a27
Nicer error message when importing a kitten fails 2022-03-02 08:26:06 +05:30
pagedown
da5213346a
show_error kitten: Use green color for closing tips 2022-02-28 15:02:16 +08:00
pagedown
e3adf8c6bf
show_error kitten: Exit at EOF 2022-02-24 21:13:57 +08:00
Kovid Goyal
cb4a9d89cf
Cleanup linenum matching and add some tests 2022-02-23 23:06:19 +05:30
Kovid Goyal
7800c598f6
hints kitten: Fix a regression that broke recognition of path:linenumber:colnumber
Fixes #4675
2022-02-23 22:38:54 +05:30
Kovid Goyal
6bfb6da0ad
Make the regex for sgr stripping tighter 2022-02-15 22:33:51 +05:30
Kovid Goyal
56a5738018
Remove unused code 2022-02-15 22:22:07 +05:30
Kovid Goyal
919667129f
hints kitten: Avoid double scan of input text 2022-02-15 22:21:31 +05:30
Kovid Goyal
53716c084b
hints kitten: Strip prompt mark escape codes 2022-02-15 22:04:10 +05:30
pagedown
cafc3973ec
mouse_demo: Add mouse scroll wheel buttons 2022-02-13 16:45:48 +08:00
pagedown
436a57a61e
mouse_demo: Fix mouse extra button bit mask 2022-02-13 16:36:51 +08:00
pagedown
d40e6a9ece
hints kitten: Match and strip Unicode single and double quotes 2022-02-11 14:59:35 +08:00
Kovid Goyal
c9da734c0e
Show the output from failed ssh commands 2022-02-08 10:46:34 +05:30
pagedown
7cc3d5907f
Docs: Prefer namespaced launch points 2022-02-08 01:07:23 +08:00
pagedown
80a62c8d71
Add preamble to generated file and fix gen-config.py filename 2022-02-05 13:05:13 +08:00
Kovid Goyal
1e7edd0218
... 2022-02-03 20:14:52 +05:30
Kovid Goyal
2fd8ef389e
Fix use-python not working reliably with SSH kitten 2022-02-03 19:58:10 +05:30
Kovid Goyal
53589c3954
ssh kitten: Fix location of generated terminfo files on NetBSD
Fixes #4622
2022-02-03 19:51:37 +05:30
pagedown
4a3ed62809
Refactor: More f-string for kittens 2022-01-29 20:23:34 +08:00
pagedown
dc61adf9d8
Refactor: More f-string 2022-01-28 19:34:13 +08:00
Kovid Goyal
5cdff7d6d0
themes kitten: Allow writing to a different file than kitty.conf 2022-01-27 20:24:39 +05:30
Kovid Goyal
0a3acd9738
ask kitten: Use buttons for choices as well 2022-01-22 13:57:25 +05:30
Kovid Goyal
08f159c2ba
TypeCheck underline style names 2022-01-22 12:41:26 +05:30
Kovid Goyal
d4e7587686
use underline instead of color for default choice 2022-01-22 12:35:43 +05:30
Kovid Goyal
32e31a3c6b
Cancelling the choice kitten should return the empty response 2022-01-22 12:13:32 +05:30
Kovid Goyal
9419125387
Highlight the default choice in yellow 2022-01-22 11:45:01 +05:30
Kovid Goyal
1bbab217d0
ask kitten: Always have a default choice 2022-01-22 11:39:54 +05:30
Kovid Goyal
05d648d411
ask kitten: Draw yes/no buttons 2022-01-22 11:32:26 +05:30
Kovid Goyal
5c832d3190
Allow multiple clickable ranges 2022-01-22 10:52:44 +05:30
Kovid Goyal
0d33380e6a
Cleanup previous PR
yesno default should be yes.
Pressing q to quit is undiscoverable
Clicking empty cells should not trigger buttons as that is
undiscoverable and possibly surprising
2022-01-22 10:44:01 +05:30
Kovid Goyal
9944b895a6
Merge branch 'kitten-ask' of https://github.com/page-down/kitty 2022-01-22 10:06:52 +05:30
Kovid Goyal
fe7045dd2f
Ask kitten: Fix rendering of multiline messages 2022-01-22 09:40:05 +05:30
pagedown
7ef73babdd
Use fixed values for unchanging dict to replace split and for loops 2022-01-22 11:36:04 +08:00
pagedown
a47aca6fdb
Add new dotted and dashed underline enum
Also use "straight" for single underline, consistent with the protocol
extension document.
2022-01-22 11:00:49 +08:00
pagedown
4fe10fadb0
... 2022-01-22 09:45:32 +08:00
pagedown
88ee5e95fc
Add default choices for features that use ask kitten 2022-01-22 03:21:59 +08:00
pagedown
9a119255fe
ask kitten: Use the default value as input text
Prefill the current value when changing the tab title.
2022-01-22 03:11:39 +08:00
pagedown
7ce11050cd
ask kitten: Esc to abort and Enter to confirm the default choice 2022-01-22 02:50:50 +08:00
pagedown
9b4d1219b8
Add default choice option for ask kitten 2022-01-22 02:46:37 +08:00
pagedown
4dd29c726a
Make the clickable range of No the same as Yes
Since the two options are treated equally, the same amount of mouse
clickable range are given.
2022-01-22 02:41:52 +08:00
Kovid Goyal
17e31565e2
Get it working even with 2 row windows assuming they are wide enough to fit the title on a single line 2022-01-21 21:46:27 +05:30
Kovid Goyal
dd72deb546
Allow ask kitten to function in a 3 line window 2022-01-21 21:43:25 +05:30
Kovid Goyal
cd0ca95877
Improve the UI of the ask kitten
Center the text in the window and allow pressing enter/esc when doing a
yes/no question

Fixes #4545
2022-01-21 20:02:13 +05:30
Kovid Goyal
f9a4b6bb0d
Use an enum for state as well 2022-01-18 13:58:55 +05:30
Kovid Goyal
f1fbfe297d
Use an enum for background work 2022-01-18 13:50:05 +05:30
Kovid Goyal
2c0ac895e6
diff kitten: Fix exiting while highlighting is incomplete causes kitten to hang until highlighting is done 2022-01-18 13:43:39 +05:30
Kovid Goyal
b32edf54f8
hints kitten: Document how to choose the empty hint for multi key hints 2022-01-15 15:17:30 +05:30
Kovid Goyal
58da5d4d29
Placate mypy 2022-01-14 22:26:05 +05:30
Kovid Goyal
4ce6d718c9
icat kitten: Add options to mirror images and remove their transparency before displaying them
Fixes #4513
2022-01-14 22:02:35 +05:30
Kovid Goyal
8bb2da3c37
Use with instead of closing manually 2022-01-14 21:12:08 +05:30
Kovid Goyal
b2bfc4408e
Fix common single letter extension files not being detected
Fixes #4491
Fixes #4492
2022-01-10 14:20:18 +05:30
Kovid Goyal
5b8aca3a2f
Use an f-string 2022-01-10 08:35:43 +05:30
Kovid Goyal
9b9eae7923
icat: Fix --hold not working with critical errors 2022-01-08 10:22:22 +05:30
Kovid Goyal
d875615c03
Fix a regression in the handling of some combining characters such as zero width joiners
Fixes #4439
2022-01-05 08:50:55 +05:30
Kovid Goyal
9aefcfe56f
Make --hold a bit more robust 2022-01-05 08:14:22 +05:30
Kovid Goyal
dae8ae33f0
hints kitten: Fix matching of filenames enclosed in quotes or brackets not stripping the surrounding quotes properly. Fixes #4419 2022-01-04 10:58:31 +05:30
pagedown
afa0bb4c1d
Avoid using the same variable name in different scopes
Variable names such as a and b are also used in the MIN and MAX macros.
2022-01-03 16:11:20 +08:00
Kovid Goyal
e228f5105e
Merge branch 'refactor' of https://github.com/page-down/kitty 2022-01-02 09:23:25 +05:30
Kovid Goyal
be771456e1
Dont shadow global variable name 2022-01-02 08:59:34 +05:30
Kovid Goyal
8514782ad2
Remove unused code
icat already scales images to fit the screen in process_image() so dont
have to consider the case of the image being wider than the screen in
set_cursor()
2022-01-02 08:56:17 +05:30
pagedown
15615a4cd1
Avoid defining variables with the same name that already exist
Avoid using existing parameter names for local variables.
Avoid using variable names from upper level for nested loops.
Avoid local variables hiding existing global variables.
2022-01-01 21:29:32 +08:00
pagedown
7246fb347c
Remove the unused function 2022-01-01 21:29:06 +08:00
Kovid Goyal
f71e0a6ee8
... 2021-12-21 10:39:06 +05:30
Kovid Goyal
90f2ba474c
Fix icat for GIF images broken 2021-12-20 17:54:55 +05:30
Kovid Goyal
8f0825bc5c
Various fixes for mypy 0.920 2021-12-17 05:56:19 +05:30
Kovid Goyal
2c6d888b3d
... 2021-12-10 07:36:09 +05:30
pagedown
98e44a8907
Unify resolution of absolute paths or config dir paths 2021-12-09 20:43:07 +08:00
pagedown
02a7316342
Use the unified PATH search function 2021-12-09 11:32:30 +08:00
Kovid Goyal
32768e7939
Unify the PATH searching algorithm for launch and running children 2021-12-08 20:10:34 +05:30
pagedown
4a7ae0f524
Docs: use pygments styles official website url 2021-12-08 17:20:13 +08:00
Kovid Goyal
c0b73986cb
Fix #4302 2021-11-30 20:47:16 +05:30
Kovid Goyal
4448444d4b
Fix #4289 2021-11-28 11:47:25 +05:30
Kovid Goyal
e5de16bb01
Use fid_abs prefix for absolute symlinks 2021-11-24 08:41:16 +05:30
Kovid Goyal
56ea741126
Nicer repr for key definitions 2021-11-23 18:19:34 +05:30
Kovid Goyal
b7a28afe7e
missed a couple of options 2021-11-21 22:41:30 +05:30
Kovid Goyal
f3376601f2
Mark various options in text correctly 2021-11-21 22:37:11 +05:30
Kovid Goyal
ecea1ba241
... 2021-11-21 10:05:47 +05:30
Kovid Goyal
ddb1fcf430
Forgot to end receive sessions 2021-11-18 22:31:05 +05:30
Kovid Goyal
ca214ffe78
transfer receive: ensure open files are closed 2021-11-17 15:45:13 +05:30
Kovid Goyal
715925795f
Ignore errors in various finalizers during exit
This was needed for tui loop to exit cleanly when terminal i/o breaks
2021-11-17 15:43:26 +05:30
Kovid Goyal
17a48f6b9f
TUI: exit cleanly when I/O to terminal fails 2021-11-17 15:33:23 +05:30
Kovid Goyal
5c7a1d1b05
Fix typo 2021-11-17 15:19:17 +05:30
Kovid Goyal
46e51811e8
Dont rise an exception in patchfile close()
This allows partial transfers, by overwriting the dest file with the
tempfile even if the transfer was not completed
2021-11-17 14:34:14 +05:30
Kovid Goyal
1a92f99831
... 2021-11-17 13:55:33 +05:30
Kovid Goyal
14142c320a
fix incorrect repeat counts 2021-11-17 13:24:35 +05:30
Kovid Goyal
727260e69b
... 2021-11-17 13:16:50 +05:30
Kovid Goyal
ad804cc01e
Redraw progress bar on resize 2021-11-17 13:04:07 +05:30
Kovid Goyal
dab51d33f5
... 2021-11-17 12:40:06 +05:30
Kovid Goyal
77d7a6180f
unicode input kitten: Also allow using ctrl+number to switch tabs and pressing any modifier with the function keys 2021-11-17 12:17:46 +05:30
Kovid Goyal
185669ec72
Use a shorter random id for transfers
Reduces overhead and we dont actually need protection against malicious
actors, only accidental collisions
2021-11-17 11:47:46 +05:30
Kovid Goyal
18ed56b639
Handle all failed using rsync while waiting for path confirmation 2021-11-17 11:28:19 +05:30
Kovid Goyal
dc2bac0068
Only print rsync stats if some data was transferred 2021-11-17 11:18:31 +05:30
Kovid Goyal
005ab58b15
Fix single file transfer path name mapping for receive 2021-11-17 11:07:50 +05:30
Kovid Goyal
b11b04ef67
Start documenting the file transfer kitten 2021-11-17 10:33:37 +05:30
Kovid Goyal
d936ede790
Finish up rsync for file receives 2021-11-16 15:10:37 +05:30
Kovid Goyal
1603b4b522
More work on rsync based receive 2021-11-16 14:21:42 +05:30
Kovid Goyal
0eac514e52
More rsync integration work 2021-11-16 13:06:16 +05:30
Kovid Goyal
63399fe975
Start work on rsync integration for receiving files 2021-11-16 10:58:32 +05:30
Kovid Goyal
0830e66e76
broadcast kitten: Show a "fake" cursor in all windows being broadcast too
Fixes #4225
2021-11-12 22:59:20 +05:30
Kovid Goyal
a1ca607f35
More work on file transmission 2021-11-11 20:05:54 +05:30
Kovid Goyal
a2533e9a46
Render the progress bar for file receives 2021-11-11 16:32:06 +05:30
Kovid Goyal
0f23edeec3
Fix breakage caused by Color no longer being iterable 2021-11-07 07:15:55 +05:30
Kovid Goyal
69e54cb9c1
More work on file transfer 2021-11-06 20:11:11 +05:30
Kovid Goyal
60b8023928
Ensure transfer is canceled on error 2021-11-06 12:59:13 +05:30
Kovid Goyal
8099ae44d7
create fid_map after collecting files not before 2021-11-06 12:54:20 +05:30
Kovid Goyal
8e8a0d2df6
Fix rel path logic when transferring symlinks 2021-11-05 21:39:07 +05:30
Kovid Goyal
d9f4fadf2d
More work on file transfer 2021-11-05 21:33:47 +05:30
Kovid Goyal
c4b3723372
More work on file transfer 2021-11-05 13:10:04 +05:30
pagedown
b4a6ed8d8f
Allows the visual bell color to be configured 2021-11-02 19:38:36 +08:00
Kovid Goyal
39dcfb4e5d
Auto generate the list of all color config keys 2021-11-02 15:16:55 +05:30
Kovid Goyal
218582ced8
More work on file transfer 2021-10-31 20:05:48 +05:30
Kovid Goyal
4ff3d6a645
More work on file transfer 2021-10-31 13:12:23 +05:30
Kovid Goyal
32805ca968
More work on file transfer 2021-10-31 09:28:20 +05:30
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
60472fcee3
Add more type annotations 2021-10-27 14:00:29 +05:30
Kovid Goyal
d090db380f
Add more type annotations 2021-10-27 13:26:18 +05:30