jesseduffield / jesseduffield/lazygit

LazyGit crashes, when opened in a TMUX-Pane with wrong `default-terminal`

Open
#4,584 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Go
Stars
82.4k
Forks
3k
Avg merge
2d 18h
Merged PRs (30d)
19

Description

**Describe the bug**
I've had an spelling mistake in my TMUX-config.

`-set -g default-terminal tmux-256colop`
should be
`-set -g default-terminal tmux-256color`

For some reason, the spelling mistake prevented Lazygit from starting, when opened in a new Pane or Window.

```bash
tmux split-pane 'lazygit || bash'
```

![Image](https://github.com/user-attachments/assets/9d23f24b-a7e8-47b3-a28c-cf25fb64f277)

Lazygit is the only TUI application that crashed, because of this.

**To Reproduce**

1. Install `tmux` and `lazygit`.
2. Create a `.tmux.conf` file in your $HOME directory.
3. Open the `.tmux.conf` file and write `-set -g default-terminal tmux-256colop`.
4. Save and exit the file.
5. Run the `tmux` command.
6. Now, from within TMUX try to open lazygit via the following command.
```bash
tmux split-pane 'lazygit || bash'
```

**Expected behavior**
To not crash.

**Version info:**
Lazygit - Version
```
commit=, build date=, build source=Homebrew, version=0.50.0, os=darwin, arch=arm64, git version=2.39.5 (Apple Git-154)
```

Git - Version:
```
git version 2.39.5 (Apple Git-154)
```

TMUX - Version:
```
tmux 3.5a
```

**Additional context**
Setting the `default-terminal` to `tmux-256color` fixes the issue, but as said above, Lazygit is the only application, i've encountered, that creashes because of that spelling mistake.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.