Magnus Groß 0d4cd8a1e0 Allow to pass the command to execute via "-e"
Right now wezterm already allows to pass a cmdline to execute (instead
of the shell) by calling "wezterm start" with trailing arguments, e.g.
wezterm start -- bash

However, most other terminals implement this via a "-e" option. This
seems to be adopted widely in the wild, such that some third-party
frameworks just blindly expect the user's terminal to use the "-e"
option for this.

One such notable framework is kio from KDE Plasma, that calls the user's
terminal in that way when launching a desktop file that uses
Terminal=true. [1]

To solve this problem, we add a compatibility layer by adding a dummy
"-e" option. This will then consume the "-e" leaving the remaining
arguments as trailing arguments, which will later be consumed by our
existing implementation in the "prog" option.

Given that clap does not really support multiple arguments writing to
the same destination [2], this seems like the most sane implementation,
even if it is a hack.

It seems to work reliable, even for edge cases where we pass wezterm
options as trailing arguments, e.g. the following will just work and do
the expected outcome (and will **not** parse "--position" as a wezterm
argument):
wezterm start -e echo --position 10,10

Fixes #2622

[1] https://bugs.kde.org/show_bug.cgi?id=459616
[2] https://github.com/clap-rs/clap/issues/3146
2022-11-04 06:32:32 -07:00
2022-10-21 21:47:09 -07:00
2022-10-04 08:55:31 -07:00
2019-06-08 21:28:11 -07:00
2022-10-21 20:53:29 -07:00
2022-05-21 21:09:11 -07:00
2022-10-21 21:47:09 -07:00
2022-10-19 20:00:13 -07:00
2022-10-19 20:00:13 -07:00
2022-08-17 07:19:12 -07:00
2022-08-21 08:51:16 -07:00
2022-10-23 20:50:47 -07:00
2022-11-01 07:05:33 -07:00
2022-10-04 08:55:31 -07:00
2022-11-02 08:16:09 -07:00
2022-11-02 08:16:09 -07:00
2022-08-17 07:19:12 -07:00
2022-10-23 20:50:47 -07:00
2022-10-23 20:50:47 -07:00
2022-10-04 08:55:31 -07:00
2022-11-02 08:16:09 -07:00
2021-02-03 21:56:30 -08:00
2022-11-02 08:16:09 -07:00
2022-10-22 17:10:36 -07:00
2022-07-29 13:18:53 -07:00
2022-10-04 09:01:12 -07:00
2022-01-16 16:04:35 -07:00
2022-09-15 06:32:16 -07:00

Wez's Terminal

WezTerm Icon A GPU-accelerated cross-platform terminal emulator and multiplexer written by @wez and implemented in Rust

User facing docs and guide at: https://wezfurlong.org/wezterm/

Screenshot

Screenshot of wezterm on macOS, running vim

Installation

https://wezfurlong.org/wezterm/installation.html

Getting help

This is a spare time project, so please bear with me. There are a couple of channels for support:

  • You can use the GitHub issue tracker to see if someone else has a similar issue, or to file a new one.
  • Start or join a thread in our GitHub Discussions; if you have general questions or want to chat with other wezterm users, you're welcome here!
  • There is a Matrix room via Element.io for (potentially!) real time discussions.

The GitHub Discussions and Element/Gitter rooms are better suited for questions than bug reports, but don't be afraid to use whichever you are most comfortable using and we'll work it out.

Supporting the Project

If you use and like WezTerm, please consider sponsoring it: your support helps to cover the fees required to maintain the project and to validate the time spent working on it!

Sponsor WezTerm

S
Description
The agentic terminal: a WezTerm fork with LLeMbas built in
Readme MIT
316 MiB
0 Stars 2 Watchers 0 Forks
Languages
Rust 97.7%
Python 1%
Shell 0.9%
Nix 0.2%