Skip to content

Commit 8df5b7b

Browse files
committed
simplify help
1 parent cc237bf commit 8df5b7b

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

keyszer/cli.py

+9-10
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
from .logger import *
3-
from .info import __version__, __name__
3+
from .info import __version__, __name__, __description__
44

55
CONFIG_HEADER = b"""
66
# -*- coding: utf-8 -*-
@@ -33,21 +33,20 @@ def main():
3333
# Parse args
3434
import argparse
3535
from appdirs import user_config_dir
36-
parser = argparse.ArgumentParser(description='Yet another keyboard remapping tool for X environment.')
37-
# parser.add_argument('config', metavar='config.py', type=str, default=user_config_dir('keyszer/config.py'), nargs='?',
38-
# help='configuration file (See README.md for syntax)')
39-
parser.add_argument('-c', '--config', dest="config", metavar="config_file", type=str,
36+
parser = argparse.ArgumentParser(description=__description__)
37+
parser.add_argument('-c', '--config', dest="config", metavar="config.py", type=str,
4038
default=user_config_dir('keyszer/config.py'),
41-
help='configuration file (See README.md for syntax)')
39+
help='use custom configuration file')
4240
parser.add_argument('-d', '--devices', dest="devices", metavar='device', type=str, nargs='+',
43-
help='keyboard devices to remap (if omitted, keyszer choose proper keyboard devices)')
41+
help='manually specify devices to remap')
4442
parser.add_argument('-w', '--watch', dest='watch', action='store_true',
45-
help='watch keyboard devices plug in ')
43+
help='watch for new hot-plugged devices')
4644
parser.add_argument('-q', '--quiet', dest='quiet', action='store_true',
4745
help='suppress output of key events')
48-
parser.add_argument('--list-devices', dest='list_devices', action='store_true')
46+
parser.add_argument('--list-devices', dest='list_devices', action='store_true',
47+
help="")
4948
parser.add_argument('--version', dest='show_version', action='store_true',
50-
help='show version')
49+
help='')
5150
parser.add_argument('--very-bad-idea', dest='run_as_root', action='store_true',
5251
help="(deprecated: run as root, don't do this)")
5352
args = parser.parse_args()

0 commit comments

Comments
 (0)