maralorn/nix-output-monitor

nom sometimes breaks line wrapping in tmux

Open

#124 aberto em 8 de dez. de 2023

Ver no GitHub
 (5 comments) (0 reactions) (0 assignees)Haskell (46 forks)batch import
bughelp wanted

Métricas do repositório

Stars
 (1.523 stars)
Métricas de merge de PR
 (Mesclagem média 3d) (11 fundiu PRs em 30d)

Description

Hey, so I will try to explain the exact issue but I don't really know how to nail this down any further. My use case is pretty much a shell script like this:

nix-store nix-store --realise --log-format internal-json -v … 2> >(nom --json)
result/bin/switch-to-configuration

I usually run this in tmux, but sometimes that breaks line wrapping. What happens is that rather than the newline creating a new line, the cursor stays at the rightmost column and just prints all characters in that position. This is especially noticable with long lines of services being started/stopped. The issue also persists when the commands are done and I get thrown back into my shell.

An issue is that this doesn't always happen, only some times. I assume it's related to what is being outputted (like long build names and whatnot) so it doesn't always trigger.

One thing of note is that I usually use ttyctl -f in zsh, which means that my stty settings should be reset once a command is done (and the prompt is being drawn). This is why I assume it's not stty-related and rather something else.

I use tmux 3.3a, zsh 5.9 and nom 2.1.1.

Please tell me if there's anything to narrow that issue down.

Guia do colaborador