zellij-org / zellij

A terminal workspace with batteries included
https://zellij.dev
MIT License
19.38k stars 610 forks source link

zellij run command in-place with nushell causes crash #3448

Open jkilopu opened 1 week ago

jkilopu commented 1 week ago

Basic information

nushell --version: 0.94.2 zellij --version: 0.40.1 uname -av: Darwin jkilopu.local 23.5.0 Darwin Kernel Version 23.5.0: Wed May 1 20:16:51 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T8103 arm64

Issue description

Running a command in-place with nushell as the shell causes crash

Minimal reproduction

  1. Run zellij with SHELL=nu zellij
  2. Execute zellij run -i -- ls
  3. zellij crash and show error message

    Error occurred in server:
    
    × Thread 'screen' panicked.
    ├─▶ Originating Thread(s)
    │     1. screen_thread: HandlePtyBytes
    │   
    ├─▶ At zellij-server/src/lib.rs:956:18
    ╰─▶ Program terminates: a fatal error occured
    
      Caused by:
          0: failed to process pty bytes
          1: failed to handle pty bytes from fd 0
          2: failed to process pty bytes from pid 0
          3: failed to write to pane with id Terminal(0)
          4: failed to find pane with id Terminal(0)
    help: If you are seeing this message, it means that something went wrong.
    
        -> To get additional information, check the log at: /var/folders/kh/qzkj7dxs06v64w6sbqqwk0xm0000gn/T/zellij-501/zellij-log/zellij.log
        -> To see a backtrace next time, reproduce the error with: RUST_BACKTRACE=1 zellij [...]
        -> To help us fix this, please open an issue: https://github.com/zellij-org/zellij/issues

Other relevant information

zellij.log