wez / wezterm

A GPU-accelerated cross-platform terminal emulator and multiplexer written by @wez and implemented in Rust
https://wezfurlong.org/wezterm/
Other
16.75k stars 751 forks source link

When reattaching to tmux, wezterm prints the current version number #4509

Open ferdinandyb opened 10 months ago

ferdinandyb commented 10 months ago

What Operating System(s) are you seeing this problem on?

Windows

Which Wayland compositor or X11 Window manager(s) are you using?

No response

WezTerm version

20231029-184147-bc99181f

Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?

Yes, and I updated the version box above to show the version of the nightly that I tried

Describe the bug

When opening tmux for the first time (new server, or reattaching to a pane the first time), the current version of wezterm is printed into tmux. Mildly irritating when this hits a shell prompt and very irritating when it hits vim.

To Reproduce

My tmux version is tmux 3.2a. Reattach to an existing tmux pane.

Configuration

I don't think there's anything relevant, but here it is:

-- Pull in the wezterm API
local wezterm = require 'wezterm'

-- This table will hold the configuration.
local config = {}

-- In newer versions of wezterm, use the config_builder which will
-- help provide clearer error messages
if wezterm.config_builder then
  config = wezterm.config_builder()
end

-- This is where you actually apply your config choices

-- For example, changing the color scheme:
config.color_scheme = 'Dracula'
if wezterm.target_triple == 'x86_64-pc-windows-msvc' then
  config.default_prog = { 'wsl', '--cd', '~' }
end
config.window_close_confirmation = 'NeverPrompt'
-- config.disable_default_key_bindings = true
config.keys = {
  -- Turn off the default CMD-m Hide action, allowing CMD-m to
  -- be potentially recognized and handled by the tab
  {
    key = 'V',
    mods = 'CTRL',
    action = wezterm.action.PasteFrom 'Clipboard'
  },
  {
    key = 'C',
    mods = 'CTRL',
    action = wezterm.action.CopyTo 'Clipboard'
  },
  {
    key = '0',
    mods = 'CTRL|SHIFT',
    action = wezterm.action.ActivateTab(0)
  },
  {
    key = '1',
    mods = 'CTRL|SHIFT',
    action = wezterm.action.ActivateTab(1)
  }
}
config.check_for_updates = false
config.hide_tab_bar_if_only_one_tab = true
config.scrollback_lines = 35000
config.font_size = 13

config.font = wezterm.font('CaskaydiaCove Nerd Font', { weight = 'Light' })
return config

Expected Behavior

Wezterm should not print stuff.

Logs

No response

Anything else?

No response

HolbyFPV commented 10 months ago

Seeing this exact behavior. Struggling to find a workaround. #2060 did not help.

thundron commented 4 months ago

+1, I did not find this issue before so I opened https://github.com/wez/wezterm/issues/5342 which is probably the same; feel free to close that one