@@ -178,6 +178,14 @@ def subcommand_load(args):
178
178
logger .error ('%s not found.' % configfile )
179
179
180
180
181
+ def subcommand_import_teamocil (args ):
182
+ print (args )
183
+
184
+
185
+ def subcommand_import_tmuxinator (args ):
186
+ print (args )
187
+
188
+
181
189
def subcommand_convert (args ):
182
190
if args .configs :
183
191
if '.' in args .configs :
@@ -284,7 +292,6 @@ def cli_parser():
284
292
''' ,
285
293
)
286
294
287
- parser = argparse .ArgumentParser ()
288
295
subparsers = parser .add_subparsers (title = 'subcommands' ,
289
296
description = 'valid subcommands' ,
290
297
help = 'additional help' )
@@ -294,7 +301,7 @@ def cli_parser():
294
301
295
302
kill_session .add_argument (
296
303
dest = 'session_name' ,
297
- nargs = '*' ,
304
+ nargs = 1 ,
298
305
type = str ,
299
306
default = None ,
300
307
)
@@ -304,7 +311,7 @@ def cli_parser():
304
311
305
312
attach_session .add_argument (
306
313
dest = 'session_name' ,
307
- nargs = '*' ,
314
+ nargs = 1 ,
308
315
type = str ,
309
316
default = None ,
310
317
)
@@ -317,7 +324,7 @@ def cli_parser():
317
324
318
325
load .add_argument (
319
326
dest = 'configs' ,
320
- nargs = '*' ,
327
+ nargs = 1 ,
321
328
type = str ,
322
329
default = None ,
323
330
help = '''\
@@ -337,7 +344,7 @@ def cli_parser():
337
344
338
345
convert .add_argument (
339
346
dest = 'configs' ,
340
- nargs = '*' ,
347
+ nargs = 1 ,
341
348
type = str ,
342
349
default = None ,
343
350
help = '''\
@@ -351,6 +358,37 @@ def cli_parser():
351
358
)
352
359
convert .set_defaults (callback = subcommand_convert )
353
360
361
+ importparser = subparsers .add_parser ('import' )
362
+ importsubparser = importparser .add_subparsers (title = 'subcommands' ,
363
+ description = 'valid subcommands' ,
364
+ help = 'additional help' )
365
+
366
+ import_teamocil = importsubparser .add_parser ('teamocil' )
367
+
368
+ import_teamocil .add_argument (
369
+ dest = 'config' ,
370
+ nargs = 1 ,
371
+ type = str ,
372
+ default = None ,
373
+ help = '''\
374
+ Checks current ~/.teamocil and current directory for yaml files.
375
+ '''
376
+ )
377
+ import_teamocil .set_defaults (callback = subcommand_import_teamocil )
378
+
379
+ import_tmuxinator = importsubparser .add_parser ('tmuxinator' )
380
+
381
+ import_tmuxinator .add_argument (
382
+ dest = 'config' ,
383
+ nargs = 1 ,
384
+ type = str ,
385
+ default = None ,
386
+ help = '''\
387
+ Checks current ~/.tmuxinator and current directory for yaml files.
388
+ '''
389
+ )
390
+ import_tmuxinator .set_defaults (callback = subcommand_import_tmuxinator )
391
+
354
392
parser .add_argument ('--log-level' , dest = 'log_level' , default = 'INFO' ,
355
393
metavar = 'log-level' ,
356
394
help = 'Log level e.g. INFO, DEBUG, ERROR' )
0 commit comments