1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-19 11:21:39 +03:00
Commit Graph

101 Commits

Author SHA1 Message Date
Wez Furlong
225e7a1243 introduce unicode_version config
This is a fairly far-reaching commit. The idea is:

* Introduce a unicode_version config that specifies the default level
  of unicode conformance for each newly created Terminal (each Pane)
* The unicode_version is passed down to the `grapheme_column_width`
  function which interprets the width based on the version
* `Cell` records the width so that later calculations don't need to
  know the unicode version

In a subsequent diff, I will introduce an escape sequence that allows
setting/pushing/popping the unicode version so that it can be overridden
via eg: a shell alias prior to launching an application that uses a
different version of unicode from the default.

This approach allows output from multiple applications with differing
understanding of unicode to coexist on the same screen a little more
sanely.

Note that the default `unicode_version` is set to 9, which means that
emoji presentation selectors are now by-default ignored.  This was
selected to better match the level of support in widely deployed
applications.

I expect to raise that default version in the future.

Also worth noting: there are a number of callers of
`unicode_column_width` in things like overlays and lua helper functions
that pass `None` for the unicode version: these will assume the latest
known-to-wezterm/termwiz version of unicode to be desired. If those
overlays do things with emoji presentation selectors, then there may be
some alignment artifacts. That can be tackled in a follow up commit.

refs: #1231
refs: #997
2021-11-25 09:00:45 -07:00
Wez Furlong
9822e80adb wezterm-ssh: ask kernel to allocate port number for tests
The ssh tests are the main flakey failure in CI, so let's see if
we can make them less flakey.
2021-11-23 06:16:31 -07:00
Wez Furlong
d1e0562631 restore async_ossl dep after wezterm-ssh crates.io release 2021-11-23 05:36:52 -07:00
Wez Furlong
3f63f4a2e2 prep for wezterm-ssh release 2021-11-23 05:35:51 -07:00
Wez Furlong
30cb55a7bd pty: bump version
The changes in #1275 introduce an API change, so let's not forget to
bump this.
2021-11-23 05:22:32 -07:00
nick black
3092443f89 provide missing positional arguments to diagnostics 2021-11-19 14:47:05 -08:00
Wez Furlong
154691a196 ssh: point to released libssh-rs crate 2021-11-03 09:17:32 -07:00
Wez Furlong
e736d02d9e remove patched openssl-sys crate
The appropriate openssl-src is now used upstream
2021-11-03 06:38:20 -07:00
Wez Furlong
b8ff61da5b ssh: allow wezterm ssh -v to log verbose diagnostics to stderr
Feels generally useful
2021-10-25 15:56:36 -07:00
Wez Furlong
124248028f ssh: enable proxycommand overrides via command line for libssh backend 2021-10-21 07:18:26 -07:00
Wez Furlong
6f0757b73c ssh: update for to pick up https://github.com/wez/libssh-rs/pull/1 2021-10-20 21:46:37 -07:00
Wez Furlong
b32e077231 ssh: another bump for debian9 and centos7 2021-10-20 08:28:22 -07:00
Wez Furlong
a55ba2be35 ssh: maybe fix build 2021-10-20 07:53:55 -07:00
Wez Furlong
7f138409a3 ssh: point to rev with older openssl build tweaks 2021-10-20 07:16:19 -07:00
Wez Furlong
58ad4a2c4b ssh: update to fixed win32 build
refs: #1014
2021-10-19 21:04:56 -07:00
Wez Furlong
d43f1e9e26 ssh: fixup vendored-openssl selection for libssh-rs 2021-10-19 20:33:30 -07:00
Wez Furlong
561eaa69be ssh: adopt dispatch helper in a couple more places 2021-10-19 20:33:30 -07:00
Wez Furlong
5ada8e20cc ssh: adopt dispatch helper for ssh file and dir requests too
@chipsenkbeil: I spotted a latent bug in here that got fixed as
a side effect of this change.  For `write_file` and possibly others,
reply.try_send was only called in the case where file_id was valid.
For an invalid id, I think the caller could hang.

Not sure if this was a problem in practice, but I wonder if it might
have contributed to some of the weird state issues you mentioned.
2021-10-19 20:33:30 -07:00
Wez Furlong
74b763a3f6 ssh: remove some boilerplate 2021-10-19 20:33:30 -07:00
Wez Furlong
199fd6f52f ssh: use only the first known host location for libssh 2021-10-19 20:33:30 -07:00
Wez Furlong
8be442e39b ssh: can now pass e2e tests using libssh backend 2021-10-19 20:33:30 -07:00
Wez Furlong
390fcc56ca ssh: stub out DirWrap::read_dir for libssh 2021-10-19 20:33:30 -07:00
Wez Furlong
e3f5174dcc ssh: introduce separate Dir and DirWrap types 2021-10-19 20:33:30 -07:00
Wez Furlong
9d44cc1720 ssh: introduce SftpWrap 2021-10-19 20:33:30 -07:00
Wez Furlong
a6022f5c65 ssh: allow selecting libssh or ssh2 backend via config
Pass this via the ssh option overrides:

```
wezterm ssh -o wezterm_ssh_backend=libssh hostname
```
2021-10-19 20:33:30 -07:00
Wez Furlong
1f073db776 ssh: flatten out session module 2021-10-19 20:33:30 -07:00
Wez Furlong
75f946c22c ssh: split SessionWrap out 2021-10-19 20:33:30 -07:00
Wez Furlong
65eaa44b0d ssh: split FileWrap out 2021-10-19 20:33:30 -07:00
Wez Furlong
e8b83b29c9 ssh: split ChannelWrap out 2021-10-19 20:33:30 -07:00
Wez Furlong
228df03059 ssh: move sftp module to top level
was getting too deep in there!
2021-10-19 20:33:30 -07:00
Wez Furlong
44bbfd2894 ssh: split SessionInner, out 2021-10-19 20:33:30 -07:00
Wez Furlong
bd47566681 ssh: Improve some logging/diagnostics 2021-10-19 20:33:30 -07:00
Wez Furlong
a8b64a2756 Run with libssh
This works, but on macOS, there is a segfault in openssl when the
session is closed... I'm going to try this on Linux to see if it
is consistent behavior and ponder next steps.
2021-10-19 20:33:30 -07:00
Wez Furlong
0bf50924b1 ssh: stub out libssh impl 2021-10-19 20:33:30 -07:00
Wez Furlong
f1e5c59566 ssh: introduce wrapper enum
This is a pre-cursor step to adding libssh support
2021-10-19 20:33:30 -07:00
Wez Furlong
d635512138 wezterm-ssh: restore dep after cargo publish 2021-10-10 16:38:03 -07:00
Wez Furlong
163783f483 wezterm-ssh: prep for cargo publish 2021-10-10 16:35:12 -07:00
Wez Furlong
2da43e3666 ssh: unwrap -> error handling
The port number is guaranteed to be set in the config parser,
just like for the host and user, so the unwrap is "OK", but it's
less brittle to handle the error consistent with the others here.
2021-10-10 15:03:21 -07:00
Chip Senkbeil
56c366cc45 Remove Metadata::len and Metadata::is_readonly; replace sftp unwrap() with expect() 2021-10-10 14:54:45 -07:00
Chip Senkbeil
2415a44d74 Switch to camino::{Utf8PathBuf, Utf8Path} 2021-10-10 14:54:45 -07:00
Chip Senkbeil
1ff2a1eb82 Add bitflags type safety to sftp flags 2021-10-10 14:54:45 -07:00
Chip Senkbeil
d15789d2c0 Finish refactoring names of methods based on wez feedback 2021-10-10 14:54:45 -07:00
Chip Senkbeil
c3516341cb Apply renames from code review (needs full refactoring)
Co-authored-by: Wez Furlong <wez@wezfurlong.org>
2021-10-10 14:54:45 -07:00
Chip Senkbeil
9a8a0f35e7 Update realpath test to support error or ok 2021-10-10 14:54:45 -07:00
Chip Senkbeil
0cc426df7d Reenable PAM as Fedora was complaining about it being disabled 2021-10-10 14:54:45 -07:00
Chip Senkbeil
4befffccd4 Add ignore attr to non-linux/non-macos tests 2021-10-10 14:54:45 -07:00
Chip Senkbeil
7d5c301c66 Ensure /run/sshd exists, explicitly set username in sshd fixture, add back use_privilege_mode no 2021-10-10 14:54:45 -07:00
Chip Senkbeil
d98a2cbbc2 Remove deprecated privilege separation from sshd 2021-10-10 14:54:45 -07:00
Chip Senkbeil
1dd3d5cdf0 Update tests to generate keys using old PEM format 2021-10-10 14:54:45 -07:00
Chip Senkbeil
072bb1c470 Create SftpError type and associated structs to provide more verbose errors for sftp 2021-10-10 14:54:45 -07:00