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

startup_command is sent too early, even when zsh is not ready to receive it #188

Open
2 tasks done
johmsalas opened this issue Oct 3, 2024 · 1 comment
Open
2 tasks done
Assignees
Labels
bug Something isn't working

Comments

@johmsalas
Copy link

johmsalas commented Oct 3, 2024

What happened?

When I use startup_command & zsh, I expected Sesh to send the command when zsh is ready to receive it but the command is sent too early!

I must admit, this issue is partly due to my zsh taking 1 second to load. While I am currently profiling my zsh to improve its performance, it would be beneficial if Sesh could offer a mechanism to wait for the shell to fully initialize. This way, users would not need to individually optimize their zsh startup time.

I previously faced a similar situation with tmuxp, and the solution was adding a 0.5s delay before executing the command, as suggested by a tmuxp user.

Screen.Recording.2024-10-03.at.11.20.55.AM.mov

Version

sesh version dev

Relevant log output

No response

Reviewed

  • Reviewed existing issues and made sure this bug has not already been submitted.
  • I have read the documentation and understand how sesh works before submitting this bug
@johmsalas johmsalas added the bug Something isn't working label Oct 3, 2024
@johmsalas johmsalas changed the title startup_command is sent to early, even when zsh is not ready to receive it startup_command is sent too early, even when zsh is not ready to receive it Oct 3, 2024
@joshmedeski
Copy link
Owner

I think it's an important improvement to wait for the shell to load.

I'm wondering if under-the-hood we could use $SHELL to execute the function independently of the tmux window loading.

I'll have to experiment with it and get back to you, thanks for the info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Next
Development

No branches or pull requests

2 participants