Skip to content

Commit 42e97d3

Browse files
committed
CLI updates
1 parent 623ef83 commit 42e97d3

File tree

1 file changed

+31
-13
lines changed

1 file changed

+31
-13
lines changed

tmuxp/cli.py

Lines changed: 31 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -750,7 +750,10 @@ def get_parser():
750750
help='additional help'
751751
)
752752

753-
kill_session = subparsers.add_parser('kill-session')
753+
kill_session = subparsers.add_parser(
754+
'kill-session',
755+
parents=[server_parser]
756+
)
754757
kill_session.set_defaults(callback=command_kill_session)
755758

756759
kill_session.add_argument(
@@ -803,26 +806,31 @@ def get_parser():
803806
type=str,
804807
nargs='?',
805808
help='''\
806-
List of config files to launch session from.
809+
List of config files to launch session from. Usage::
810+
811+
Load ~/.tmuxp/myproject.yaml::
812+
813+
$ tmuxp load myproject.yaml
807814
808-
Checks current working directory (%s) then $HOME/.tmuxp directory (%s).
815+
Load $CWD/.tmuxp.yaml or $CWD/.tmuxp.json::
809816
810817
$ tmuxp .
811818
812-
will check launch a ~/.pullv.yaml / ~/.pullv.json from the cwd.
813-
will also check for any ./*.yaml and ./*.json.
814-
''' % (cwd_dir + '/', config_dir),
819+
'''
815820
).completer = ConfigFileCompleter(allowednames=('.yaml', '.json'), directories=False)
816821
load.set_defaults(callback=command_load)
817822

818-
convert = subparsers.add_parser('convert')
823+
convert = subparsers.add_parser(
824+
'convert',
825+
help='Convert tmuxp config between YAML and JSON format.'
826+
)
819827

820828
convert.add_argument(
821829
dest='config',
822830
type=str,
823831
default=None,
824832
help='''\
825-
Checks current working directory (%s) then $HOME/.tmuxp directory (%s).
833+
Check current working directory (%s) then $HOME/.tmuxp directory (%s).
826834
827835
$ tmuxp .
828836
@@ -833,20 +841,27 @@ def get_parser():
833841

834842
convert.set_defaults(callback=command_convert)
835843

836-
importparser = subparsers.add_parser('import')
844+
importparser = subparsers.add_parser(
845+
'import',
846+
help='Import configurations from teamocil and tmuxinator'
847+
)
837848
importsubparser = importparser.add_subparsers(
838849
title='commands',
839850
description='valid commands',
840851
help='additional help'
841852
)
842853

843-
import_teamocil = importsubparser.add_parser('teamocil')
854+
import_teamocil = importsubparser.add_parser(
855+
'teamocil',
856+
help="Parse teamocil configurations into tmuxp format"
857+
)
844858

845859
import_teamocilgroup = import_teamocil.add_mutually_exclusive_group(
846-
required=True)
860+
required=True
861+
)
847862
import_teamocilgroup.add_argument(
848863
'--list', dest='list', action='store_true',
849-
help='List yaml configs in ~/.teamocil and current working directory.'
864+
help='List configs in ~/.teamocil and current working directory.'
850865
)
851866

852867
import_teamocilgroup.add_argument(
@@ -859,7 +874,10 @@ def get_parser():
859874
).completer = TeamocilCompleter(allowednames=('.yml'), directories=False)
860875
import_teamocil.set_defaults(callback=command_import_teamocil)
861876

862-
import_tmuxinator = importsubparser.add_parser('tmuxinator')
877+
import_tmuxinator = importsubparser.add_parser(
878+
'tmuxinator',
879+
help="Parse teamocil configurations into tmuxp format"
880+
)
863881

864882
import_tmuxinatorgroup = import_tmuxinator.add_mutually_exclusive_group(
865883
required=True)

0 commit comments

Comments
 (0)