Marcel van der Boom
0853019e59
tty: take the TCSETS ioctl numbers from x/sys/unix
...
The hard-coded 0x5402/0x5403/0x5404 are the x86 (generic) values. On
powerpc TCSETS, TCSETSW and TCSETSF are 0x802c7414..6, so Tcsetattr
failed with ENOTTY and every kitten that sets terminal modes exited
at once: on ppc64le the paste confirmation (kitten ask) only flickered
and the paste was dropped. x/sys/unix defines the right value per
architecture, as already used for TCGETS in Tcgetattr and for
TIOCSETA* in tty_bsd.go. Drop the rest of the constant block too:
copied from pkg/term, unused, and also x86-only.
Verified on ppc64le: kitten ask under script(1) failed with
"inappropriate ioctl for device" (strace: ioctl 0x5402 = -ENOTTY);
with this change the TCSETS ioctl succeeds and the prompt runs.
2026-11-03 11:03:09 +01:00
Kovid Goyal
3d8a2fbb4f
Use SIMD base64 everywhere
2026-04-21 11:56:55 +05:30
Kovid Goyal
eddaaed3e3
Modernize Go code
2026-03-21 08:41:47 +05:30
Kovid Goyal
c861259e3b
Rename go module from kitty -> github.com/kovidgoyal/kitty
...
Makes the code more easily re-useable in other projects
2025-05-16 08:43:39 +05:30
Kovid Goyal
0afa6d5b3d
Fix shebang viewing of short scripts not working
2025-03-20 12:49:28 +05:30
Kovid Goyal
f3448cbbee
...
2025-03-20 12:31:02 +05:30
Kovid Goyal
0fcb055246
tty: retry on temporary read errors
2024-02-25 09:57:35 +05:30
Kovid Goyal
c650bd0aac
icat: Dont open the controlling terminal to query for size if stdout is a terminal, use it instead
2023-09-22 12:10:21 +05:30
Kovid Goyal
fc1331cfdc
Dont call tcgetattr when no operations are specified
2023-09-22 09:37:48 +05:30
Kovid Goyal
fe4fdaefb9
Remove unused code
2023-09-22 09:25:21 +05:30
Kovid Goyal
704ae40dee
More linter fixes
2023-09-22 09:24:31 +05:30
Kovid Goyal
4f72bb9894
Replace utils.Once with stdlib sync.OnceValue
2023-08-09 12:08:42 +05:30
Kovid Goyal
c8f35019f0
Fix debugprintln to forwarded stdio implementation
2023-07-30 19:49:45 +05:30
Kovid Goyal
d46590c2e6
Fix fd leak in debugprintln
2023-07-30 19:49:45 +05:30
Kovid Goyal
59b47a3a8f
A facility to easily have child programs print to kitty stdout
...
Works better than the kitty-print DCS escape code as that tends to get
interleaved with other writes to the tty since the loop infrastructure
writes in a separate I/O thread.
2023-07-30 19:49:44 +05:30
olzhasar
d0a5d1b3a4
Fix misspellings
2023-06-14 03:39:53 +06:00
Kovid Goyal
64cb9c9542
More work on porting ssh kitten
2023-02-26 11:26:28 +05:30
Kovid Goyal
fa0773d9d2
Use a struct to store connection related data
2023-02-26 08:01:03 +05:30
Kovid Goyal
67436a48cd
New API to suspend a loop
2023-02-14 22:27:41 +05:30
Kovid Goyal
cc1f0bc3fe
Function to drain controlling tty
2023-01-23 16:07:00 +05:30
Kovid Goyal
2cacd7a64a
get rid of interface{} since we now require Go 1.18
2022-11-14 15:42:00 +05:30
Kovid Goyal
ea8fb10c05
Password input: Handle SIGTSTP
2022-11-14 15:41:55 +05:30
Kovid Goyal
d7985689c9
Allow debugprintln to controlling tty easily
2022-11-14 15:41:54 +05:30
Kovid Goyal
ee12349a50
Use Go's os.File this allows us to implement WriteString without using unsafe
2022-11-14 15:41:52 +05:30
Kovid Goyal
80c5ac891d
Add license info to Go files
2022-11-14 15:41:51 +05:30
Kovid Goyal
67f03621ae
Handle EINTR in IsTerminal
2022-11-14 15:41:49 +05:30
Kovid Goyal
6a79b450f7
Drop another dependency and get a better read password function
2022-11-14 15:41:48 +05:30
Kovid Goyal
eb4ee13f73
Drop another dependency
2022-11-14 15:41:48 +05:30
Kovid Goyal
cf287015de
...
2022-11-14 15:41:48 +05:30
Kovid Goyal
246277e7af
Refactor tty code into its own package
2022-11-14 15:41:48 +05:30