Skip to content

More control over multiplexer auto-start and SSH #386

wants to merge 1 commit into from

3 participants

gdiscry commented Jan 30, 2013

Setting the auto-start style for the screen and tmux modules to 'remote' automatically starts a session only with SSH connections and to 'local' only for local terminals. The behaviour when the style is set to a boolean value is unchanged.

This was discussed in #292.


Seems good to me, it should close #292

gdiscry commented Feb 27, 2013

As this pull request has been in limbo for a month now, I'm just checking to see if there is anything I have to do before it can be merged.


@gdiscry You're using 'yes', 'remote', and 'local' for auto-start You should probably keep auto-start as a boolean variable and have a separate zstyle for local and remote, or you could have two booleans for local and remote.

gdiscry commented Mar 4, 2013

The intent was to keep backward compatibility with the boolean zstyle while limiting the complexity. But I understand that extending a boolean is not the best.

There are four possible states:

  • no auto-start
  • auto-start for local only
  • auto-start for remote only
  • auto-start for both local and remote

If we keep backward compatibility, we cannot use a boolean for the additional zstyle as we need three values, local, remote and always (the default). Something like:

zstyle ':prezto:module:tmux' auto-start 'yes'
zstyle ':prezto:module:tmux:auto-start' type 'remote'/'local'

If we drop compatibility, we can use two booleans to control auto-start for local and remote:

zstyle ':prezto:module:tmux:auto-start' local 'yes'/'no'
zstyle ':prezto:module:tmux:auto-start' remote 'yes'/'no'

If it's okay for you, I prefer the second solution. There are no dependencies between the variables and they are simple booleans. The code will probably be simpler too. The problem regarding backward compatibility might be mitigated by the merge conflict in zpreztorc.


I care not for backward compatibility until Prezto reaches v1.0.


I prefer the second one.


:+1: , for the second solution.


@gdiscry, do you intend to implement the second solution, or should I?

gdiscry commented May 19, 2013

I've been busy and got sidetracked. I'll write the implementation in the next few days.

@gdiscry gdiscry More control over multiplexer auto-start and SSH
Setting the auto-start 'remote' and 'local' styles for the screen and
tmux modules to true automatically starts a session for SSH connections
and for local terminals respectively.
gdiscry commented Jun 3, 2013

Sorry for the delay. Here is the implementation of the second solution. I've tested both modules in the different configurations and haven't noticed any issue.

gdiscry commented Jul 9, 2013

@sorin-ionescu, does the latest version of the patch work for you ?


Sorry, I have not looked at it yet.


I've skimmed over the diff, and it looks good. We'll see when I merge it. Thank you.



@gdiscry gdiscry deleted the gdiscry:enhance/screen-tmux-ssh-auto-start branch Aug 19, 2013
@sbl sbl added a commit to sbl/prezto that referenced this pull request Mar 6, 2016
@sbl sbl Squashed 'modules/completion/external/' changes from 99cc7ea..3a2bb87
3a2bb87 Merge pull request #390 from mitukiii/license
ab32765 Merge pull request #388 from JindrichPilar/cheat
2cd2548 Merge pull request #387 from JindrichPilar/diana_completion
50c9457 Add license to rails, rspec and mina
6d900a0 Completion for Cheat
89a6c71 Completion for Diana
6953a4f Merge pull request #386 from Cronos87/master
4b94fd2 Now autocompletion display the text helper for each command

git-subtree-dir: modules/completion/external
git-subtree-split: 3a2bb8781d32d05d1bf05deeeb476beb651e8272
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.