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):
290
290
else :
291
291
sys .exit ('Session created in detached state.' )
292
292
293
- builder .session .attach_session ()
293
+ if not args .detached :
294
+ builder .session .attach_session ()
294
295
except exc .TmuxSessionExists as e :
295
296
if args .answer_yes or prompt_yes_no ('%s Attach?' % e ):
296
297
if 'TMUX' in os .environ :
@@ -845,6 +846,14 @@ def get_parser():
845
846
)
846
847
load .set_defaults (callback = command_load )
847
848
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
+
848
857
convert = subparsers .add_parser (
849
858
'convert' ,
850
859
help = 'Convert tmuxp config between YAML and JSON format.'
You can’t perform that action at this time.
0 commit comments