You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The reason will be displayed to describe this comment to others. Learn more.
SHLVL doesn't get incremented by tmux for me, so this change causes the shell to crash on log-in. I think double increasing it won't hurt whilst not increasing it at all does, so in my opinion this change is best reverted.
The reason will be displayed to describe this comment to others. Learn more.
The idea behind incrementing SHLVL was to stop the code from executing and lauching tmux again. I don't remember why I had to add that to the screen plugin, which was copied to the tmux plugin, but I remember having trouble without it.
The reason will be displayed to describe this comment to others. Learn more.
In any case, checking for SHLVL is not reliable. You can start BASH then Zsh, where SHLVL will be 2 and tmux will be skipped. It will be better to just check for the zstyle and a session.
The reason will be displayed to describe this comment to others. Learn more.
Also, "$SHELL -l" or no "$SHELL -l", I'm getting the socket error.
launch_msg("SetUserEnvironment"): Socket is not connected
launch_msg("SetUserEnvironment"): Socket is not connected
launch_msg("SetUserEnvironment"): Socket is not connected
launch_msg("SetUserEnvironment"): Socket is not connected
launch_msg("SetUserEnvironment"): Socket is not connected
launch_msg("SetUserEnvironment"): Socket is not connected
The reason will be displayed to describe this comment to others. Learn more.
"launch_msg("SetUserEnvironment"): Socket is not connected" is due to tmux being used on Mac OS as is, I got that message too until I set reattach-to-user-namespace as the default shell (calling zsh).
Another way to fix that SHLVL problem would be trying to get the TMUX env variable which is set inside a tmux instance:
tmux also initialises the TMUX variable with some internal
information to allow commands to be executed from inside
This fixes both the SHLVL incrementing too much by reverting to the "default" behaviour and the tmux inside a zsh inside a zsh issue.
And actually that's how tmux works by default if you try to nest tmux:
~ $ tmux ⏎
sessions should be nested with care. unset $TMUX to force.
The reason will be displayed to describe this comment to others. Learn more.
I do have that since pbcopy/pbapste would not work without it. I still get the message.
I have also got another kernel panic. This time in Terminal instead of iTerm.
Tmux on Mac OS X is rubbish.
The reason will be displayed to describe this comment to others. Learn more.
I will not be merging #55 and will be removing the tmux plugin. I cannot in good conscience promote it. Perhaps it works well on Linux, but I will not have something in OMZ that crashes systems, any system.
The reason will be displayed to describe this comment to others. Learn more.
I don't understand why you got so many issues, I'm working on Mac OS and didn't get any issue so far. But I understand why you want to remove the plugin
The reason will be displayed to describe this comment to others. Learn more.
Tmux has always had issues on Mac OS X. I'm not sure if any of its main developers use Mac OS X. GNU Screen may be an unmaintained spaghetti, but at least it's stable. Though, I prefer to use my own attach.
The reason will be displayed to describe this comment to others. Learn more.
The main reason for me to use tmux was the features available when the "daemon mode" I pushed in another branch is also active. Anyway I'll keep a branch with this plugin available if someone wants to use it (as it works fine in my environments, I'll use it myself).
The reason will be displayed to describe this comment to others. Learn more.
@japz, I'll have to install an environment myself to do more tests. But could you tell me if you have a result on a print $TMUX ? It should be set automatically. If it actually works, we should have a nice way to start tmux without having to rely on SHLVL
17a4505
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SHLVL doesn't get incremented by tmux for me, so this change causes the shell to crash on log-in. I think double increasing it won't hurt whilst not increasing it at all does, so in my opinion this change is best reverted.
17a4505
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
17a4505
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sorin-ionescu, indeed, it should be the inside shell that increase SHLVL.
It works fine without #55 (Actually it works fine with a vanilla zsh and a vanilla tmux).
Could you show us your tmux settings, @japz ? (have you got a
set-option default-command
in your conf?)17a4505
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea behind incrementing
SHLVL
was to stop the code from executing and lauching tmux again. I don't remember why I had to add that to the screen plugin, which was copied to the tmux plugin, but I remember having trouble without it.17a4505
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, in screen for some reason SHLVL isn't incremented, but in tmux it is (as far as I know).
17a4505
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not working for me. It's always one. I get an infinite loop. I'm reverting this.
17a4505
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, if it's not working it's better to revert this. But still I don't know why there would be different behaviours.
17a4505
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, I'm fed up with tmux, iTerm, or both.
17a4505
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, that's really weird. I've been using tmux for days now (on two different machines) I never got that.
Is it the last tmux available on homebrew?
Related (not read it yet) : http://comments.gmane.org/gmane.comp.terminal-emulators.tmux.user/1852
17a4505
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whatever you have in your default-command probably increments your SHLVL.
There also a couple of issues open in the iTerm bug tracker.
17a4505
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In any case, checking for
SHLVL
is not reliable. You can start BASH then Zsh, where SHLVL will be 2 and tmux will be skipped. It will be better to just check for the zstyle and a session.17a4505
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, I'm getting an infinite loop no matter what. It's not creating new sessions. It attaches to the same one over and over again.
17a4505
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, "$SHELL -l" or no "$SHELL -l", I'm getting the socket error.
I'm thinking of removing the plugin.
17a4505
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"launch_msg("SetUserEnvironment"): Socket is not connected" is due to tmux being used on Mac OS as is, I got that message too until I set
reattach-to-user-namespace
as the default shell (calling zsh).Another way to fix that SHLVL problem would be trying to get the TMUX env variable which is set inside a tmux instance:
This fixes both the SHLVL incrementing too much by reverting to the "default" behaviour and the tmux inside a zsh inside a zsh issue.
And actually that's how tmux works by default if you try to nest tmux:
17a4505
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
17a4505
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will not be merging #55 and will be removing the tmux plugin. I cannot in good conscience promote it. Perhaps it works well on Linux, but I will not have something in OMZ that crashes systems, any system.
17a4505
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand why you got so many issues, I'm working on Mac OS and didn't get any issue so far. But I understand why you want to remove the plugin
17a4505
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tmux has always had issues on Mac OS X. I'm not sure if any of its main developers use Mac OS X. GNU Screen may be an unmaintained spaghetti, but at least it's stable. Though, I prefer to use my own attach.
17a4505
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The main reason for me to use tmux was the features available when the "daemon mode" I pushed in another branch is also active. Anyway I'll keep a branch with this plugin available if someone wants to use it (as it works fine in my environments, I'll use it myself).
17a4505
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's fine. You can add a comment to #62.
17a4505
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But if I understand why you would want to remove the tmux plugin, I don't really understand why the screen plugin should stay. (same reasons as tmux)
17a4505
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have never seen GNU Screen crash a system, ever. So, it's not the same.
17a4505
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
17a4505
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow that's a lot of talk in one day. :)
FWIW: I was using tmux without any special configuration on a linux machine.
17a4505
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@japz, I'll have to install an environment myself to do more tests. But could you tell me if you have a result on a
print $TMUX
? It should be set automatically. If it actually works, we should have a nice way to start tmux without having to rely on SHLVL17a4505
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, $TMUX is set (on my linux machine and OSX machine)
: ~ ❯ echo $TMUX
/tmp/tmux-500/default,6764,0
so checking for that instead of SHLVL makes sense
17a4505
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, so it will be fixed by #55