Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tmuxinator Conflict #249

Open
Gex2501 opened this issue Sep 14, 2024 · 3 comments
Open

Tmuxinator Conflict #249

Gex2501 opened this issue Sep 14, 2024 · 3 comments

Comments

@Gex2501
Copy link

Gex2501 commented Sep 14, 2024

With tmuxinator I used to be able to have a command initially run when a window/pane was created. After updating hishtory to 0.311 the command prints in the window but never executes. If I comment out the source /home/user/.hishtory/config.zsh from my .zshrc file it works fine, but of course hishtory does not. I wish I could downgrade hishtory to tell you what version it was working on but I don't know how to do that.

edit: I have been able to rollback my virtual machine and confirm things were working correctly in v0.297

@Gex2501
Copy link
Author

Gex2501 commented Sep 14, 2024

I have been able to determine that whatever was changed from v.0.304 to v.0.305 is when the problem began to occur.

@ddworken
Copy link
Owner

Ah interesting, thank you for opening this bug! I tried to reproduce this with this tmuxinator config:

name: test
root: ~/

on_project_start: echo on_project_start

windows:
  - editor:
      layout: main-vertical
      panes:
        - echo pane

And for me, things seem to be working as I'd expect where I see both of those echo commands get executed. Can you share a bit more about your tmuxinator config and exactly what behavior you're observing? Also what tmuxinator, tmux, and shell versions you're using might be helpful. Thank you!

@Gex2501
Copy link
Author

Gex2501 commented Sep 16, 2024

I believe I have narrowed down the problem. It's something to do with setting the TERM variable.
In my .zshrc I have export TERM="xterm-256color" and in my .tmux.conf I have set -g default-terminal 'linux'
I don't know why I have these lines exactly. Just something that got put in over the years.
I have to comment out BOTH of those lines to make things work as expected. If either of the lines is present the initial commands in the panes do not run.

NOTE: the on_project_start in the test.yml file seems to be just fine.

Here's my sample configuration, some items redacted. I took out all my other crazy configuration and narrowed it down to barebones. Everything else in my config doesn't seem to be an issue. I think you can replicate the problem using this configuration.

versions:

Ubuntu 24.04.1 LTS
zsh 5.9 (x86_64-ubuntu-linux-gnu)
omz master (f6cd6a7) #latest
tmux 3.4
tmuxinator 3.3.0
hishtory version v0.311

~/.zshrc:

# Created by newuser for 5.9

# For screen compatibility
export TERM="xterm-256color"

# Hishtory Config:
export OPENAI_API_KEY=ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890
export HISHTORY_SERVER=http://SERVER.TAILNET.ts.net:8088
[[ ":$PATH:" != *":$HOME/.hishtory:"* ]] && export PATH="$PATH:$HOME/.hishtory"
source /home/USERNAME/.hishtory/config.zsh

~/.config/tmuxinator/test.yml

name: test
root: ~/

on_project_start: echo on_project_start

windows:
  - editor:
      layout: main-vertical
      panes:
        - echo pane
        - date

~/.tmux.conf

set -g default-terminal 'linux'

This screen recording might also be helpful.
https://github.com/user-attachments/assets/23093b83-a378-4ab3-80d2-e1fcfde1b5fc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants