-
Notifications
You must be signed in to change notification settings - Fork 627
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
Exit tmuxinator project session #92
Comments
+1 |
It would be great if tmuxinator is closing files opened with vi. IMO that could be a default behaviour. |
In the same related feature, having a |
This seems like a popular feature that I'd really want to add. However the way tmux wrappers work typically (including tmuxinator) is outputting a set of shell commands that starts the tmux session, attaching you to the started session and then exiting. tmuxinator has then no knowledge of the tmux process. Because of this, as far as I can see, there are two ways to approach this given the way tmux works:
If anyone else has suggestions I'd love to hear other ways to to tackle this. |
Perhaps you could have a new hash config item under the tabs hash that specifies exit key-presses for how to quit that particular window? Then a separate tmux command to issue the various tmux send-keys. (I don't know if this is any more graceful than what you suggested, but, at least it's customisable). Example:
So if the session was called APP, then you'd just have to wrap together a bunch of commands similar to: |
Wow.. sorry, the 'space indentation' I had in that comment did not apparently come through at all :( |
That's not a bad idea @xntrik. It'd have to be a top level item in the config though: So: tabs:
- editor: vim
- logs: tail -f log/development.log
- console:
panes:
- bundle exec rails console
- mysql database
post_tab:
- editor: :wq
- logs: C-c
- console:
panes:
- exit
- \q This would close all applications provided each pane/window had the process running in them. After that we can close all the windows via Couple of things though:
Thoughts? |
I think that looks pretty good. I can't imagine many people would actually use this functionality. I guess it's whether or not you'd see this method is better than having no method. |
I'm gonna tag this for 0.8.0. It'll require a bit more thought but I think it is doable. |
👍 for I'd love to also see a general |
Isn't this similar to Issue #87? |
@ramonjavaier yes it is. |
This feature would be really helpful. I run a rails server in one of the panes and if it doesnt get shut down properly, the next time I have to manually kill the rails process and delete the pid file |
+1 |
+1 # This feature would be extra sweet. Subbing for winning. |
👍 |
5 similar comments
+1 |
+1 |
+1 |
👍 |
+1 |
After thinking about this, I decided that tmuxinator was the wrong place for this feature to live. So I implemented it as a tmux plugin. Please check it out and let me know what you think. https://github.com/jlipps/tmux-safekill |
Closing in favour of jlipps/tmux-safekill. |
If you get here because |
+1, tmux-safekill |
It'd be neat to have a feature which allows you to exit a tmuxinator project session safely i.e.
for a pane running vim, it first does a :qa, followed by a to close the pane,
for a pane running a server, it does a followed by
The exact commands could be specified in the project yaml file.
Comments?
The text was updated successfully, but these errors were encountered: