Powershell subscript causes tmux display issues #78

Open
opened 2026-01-30 21:41:38 +00:00 by claunia · 0 comments
Owner

Originally created by @bitcrazed on GitHub (Feb 16, 2018).

From @serrearthur on December 7, 2017 21:35

When executing a powershell.exe script inside a tmux session, this will mess the display until the tmux session is closed.

capture
On this picture, the left pane should be filled with text from the output of ls -al, and the right panes are missing part of their borders.

Step to reproduce :

  • Install tmux (tested with tmux 2.6)
  • Launch it (works even without .tmux.conf file)
  • Create a new vertical pane : tmux split-window -h
  • Launch a powershell.exe command : powershell.exe -Help | less
    This will mess up your display : it hides parts of your screen, will not update some data, will copy some text all over your screen, ...

Cases tested :

  • Reproduced with both bash and zsh
  • Reproduced even when redirecting the output of powershell : powershell.exe -Help &>/dev/null
  • Reproduced with various powershell flags : powershell.exe -NoLogo -NoProfile -NonInteractive -OutputFormat Text -Help &>/dev/null
  • Reproduced even without doing tmux split-window -h. However, there are only a few graphical bugs in this case. Spliting the window makes the problem clearer.
  • Windows version : 10.0.17046.1000

Is this a bug ? Is there a workaround ?


Just as a side note, the reason I wanted to execute powershell commands is because I want to retreive the status of NUM_LOCK and CAPS_LOCK, and xset q always return false on WSL. Instead, I used powershell.exe "[console]::NumberLock" and powershell.exe "[console]::CapsLock" to get the real status.

Copied from original issue: Microsoft/WSL#2731

Originally created by @bitcrazed on GitHub (Feb 16, 2018). _From @serrearthur on December 7, 2017 21:35_ When executing a `powershell.exe` script inside a tmux session, this will mess the display until the tmux session is closed. ![capture](https://user-images.githubusercontent.com/4455328/33739467-7b0ce5c6-db9d-11e7-93c6-9aa5b1d2199c.PNG) On this picture, the left pane should be filled with text from the output of `ls -al`, and the right panes are missing part of their borders. Step to reproduce : - Install `tmux` (tested with `tmux 2.6`) - Launch it (works even without `.tmux.conf` file) - Create a new vertical pane : `tmux split-window -h` - Launch a powershell.exe command : `powershell.exe -Help | less` This will mess up your display : it hides parts of your screen, will not update some data, will copy some text all over your screen, ... Cases tested : - Reproduced with both `bash` and `zsh` - Reproduced even when redirecting the output of powershell : `powershell.exe -Help &>/dev/null` - Reproduced with various powershell flags : `powershell.exe -NoLogo -NoProfile -NonInteractive -OutputFormat Text -Help &>/dev/null` - Reproduced even without doing `tmux split-window -h`. However, there are only a few graphical bugs in this case. Spliting the window makes the problem clearer. - Windows version : 10.0.17046.1000 Is this a bug ? Is there a workaround ? --- Just as a side note, the reason I wanted to execute `powershell` commands is because I want to retreive the status of NUM_LOCK and CAPS_LOCK, and `xset q` always return `false` on WSL. Instead, I used `powershell.exe "[console]::NumberLock" ` and `powershell.exe "[console]::CapsLock" ` to get the real status. _Copied from original issue: Microsoft/WSL#2731_
claunia added the Product-ConhostArea-Interop labels 2026-01-30 21:41:38 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#78