File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -290,7 +290,8 @@ def load_workspace(config_file, args):
290290 else :
291291 sys .exit ('Session created in detached state.' )
292292
293- builder .session .attach_session ()
293+ if not args .detached :
294+ builder .session .attach_session ()
294295 except exc .TmuxSessionExists as e :
295296 if args .answer_yes or prompt_yes_no ('%s Attach?' % e ):
296297 if 'TMUX' in os .environ :
@@ -845,6 +846,14 @@ def get_parser():
845846 )
846847 load .set_defaults (callback = command_load )
847848
849+ load .add_argument (
850+ '-d' ,
851+ dest = 'detached' ,
852+ default = None ,
853+ help = 'Load a session without attaching to it.' ,
854+ action = 'store_true'
855+ )
856+
848857 convert = subparsers .add_parser (
849858 'convert' ,
850859 help = 'Convert tmuxp config between YAML and JSON format.'
You can’t perform that action at this time.
0 commit comments