The rename. Commands llembas-term, -gui, -mux-server, -setup; package llembas-term
(Replaces, Conflicts and Provides llembas-tty, so installing it removes the old one);
directories llembas-term; application id eu.llembas.term; the variables a pane sees
LLEMBAS_TERM…; the status record llembas-term-status=1, the input mark
llembas-term-input=1, the user variable llembas_term_status; the shell integration
llembas-term.sh; the workflow llembas-term.yml; every changed upstream block is marked
"LLeMbas TERM:". The terminal needs the engine's terminal contract 4 and says so in
words with an older CLI.
Carried over from the earlier name: the variables LLEMBAS_TTY… of a terminal that
started this one are dropped; a configuration file of the old name is read where it
is while there is none of the new, with a warning; command-history and
settings-chosen are copied once into a data directory that does not exist yet
(llembas-line::migrate); the set-up program prints the new line for an rc file that
has the old one.
Keys. Ctrl+Tab on the ask line switches the mode (the next tab anywhere else);
Ctrl+Shift+M and Ctrl+Alt+M open the lists of chat and autocomplete models, also
over the ask line, which then says the choice. In a pane where LLeMbas IDE says it
is in front (user variable llembas_ide=1) the chords both have are sent on to it as
the keyboard protocol's bytes and the terminal does nothing of its own; the
terminal's palette is also on Ctrl+Shift+Alt+P. The built-in configuration honours
the kitty keyboard protocol for a program that asks for it.
CI: the .deb is installed over the released llembas-tty 1.0.0-beta.5; keys are
pressed in a real window on Xvfb (not a gate).
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
LLeMbas TTY installs and runs beside WezTerm without touching it:
- binaries llembas-tty, llembas-tty-gui, llembas-tty-mux-server (packages keep
upstream's names);
- configuration in $XDG_CONFIG_HOME/llembas-tty/llembas-tty.lua or
~/.llembas-tty.lua; own data, cache and runtime directories;
- LLEMBAS_TTY_CONFIG_FILE / _CONFIG_DIR / _UNIX_SOCKET / _PANE / _EXECUTABLE
replace the WEZTERM_ ones, which are neither read nor passed on, so neither
program talks to the other's panes;
- window class, app id, notification id and bundle id eu.llembas.tty;
- panes get LLEMBAS_TTY=<version>; TERM_PROGRAM stays WezTerm;
- --version shows our version and the WezTerm version it is based on;
- the update check, which asks about WezTerm's releases, is off by default.
The LLeMbas layer (llembas/lua) is compiled in and offered as
require 'llembas'; with no configuration file the built-in one applies it.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
No implementation needs mutable access to report the size. The Unix
version issues TIOCGWINSZ on the fd, the Windows version calls
GetConsoleScreenBufferInfo on the handle, and the mux and ssh
implementations copy a cached value.
The &mut requirement came from the UnixTty::get_size and
ConsoleOutputHandle::get_buffer_info helpers, which are both read-only
queries, so they take &self too.
This is a breaking change for implementors of Terminal. Callers are
unaffected, since &mut T coerces to &T.
`fancy_regex` returns Err (e.g. backtracking limit exceeded)
without advancing the iterator position, causing `captures_iter`
to loop forever on the same offset. 😬👉 Break out and warn instead.
fixes: #7773
Fixes a bunch of warnings like this:
```
warning: hiding a lifetime that's elided elsewhere is confusing
--> window/src/os/macos/window.rs:670:23
|
670 | fn display_handle(&self) -> Result<DisplayHandle, HandleError> {
| ^^^^^ ------------- the same lifetime is hidden here
| |
| the lifetime is elided here
|
= help: the same lifetime is referred to in inconsistent ways, making the signature confusing
= note: `#[warn(mismatched_lifetime_syntaxes)]` on by default
help: use `'_` for type paths
|
670 | fn display_handle(&self) -> Result<DisplayHandle<'_>, HandleError> {
| ++++
```
This lint was added in Rust 1.89: https://github.com/rust-lang/rust/issues/141787
https://github.com/wezterm/wezterm/pull/6850 changed the behavior
of spawning in such a way that if you had a default_prog and split
a pane, the default_prog you had set would not take effect.
This is because a later normalization stage would skip applying
resolving/applying the default_prog because it thought that the
command builder was already fully baked.
This commit allows that fixup logic to reason about the configured
default_prog (which may be different in a WSL context!) and fixup
the builder.
This is an alternative approach to resolving
https://github.com/wezterm/wezterm/issues/6955 for which a patch was
proprosed in https://github.com/wezterm/wezterm/pull/6972. That PR
wouldn't be quite right because the underlying logic could consider the
default_prog from a domain-specific source, rather than the global
configuration.
refs: #6769closes: #6779
The tmux output may split into multiple parts, if this spliting happens
in the middle of multiple bytes UTF8 characters, then the issue raised.
That the first part will have incomplete UTF8 character while the second
part will have a invalid UTF8 character.
In this case, we have to treat the output text as bytes rather than
UTF8 string.
This fix unvis the output text and send to pane as bytes.
On windows, if win32 input mode is active, key presses are encoded by the GUI and will bypass
the key_down logic that we use to detect when the user presses `q` to exit from `tmux -CC` mode.
This commit forces the keyboard encoding to be standard Xterm encoding for the pane
that is running `tmux -CC` mode so that we can catch the `q` press.