Merge pull request #1556 from waigx/chore/hy-help-msg

Prettify hy command helping message
This commit is contained in:
gilch 2018-03-30 11:21:00 -06:00 committed by GitHub
commit 074a4bb75f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -253,10 +253,11 @@ def run_icommand(source, **kwargs):
USAGE = "%(prog)s [-h | -i cmd | -c cmd | -m module | file | -] [arg] ..." USAGE = "%(prog)s [-h | -i cmd | -c cmd | -m module | file | -] [arg] ..."
VERSION = "%(prog)s " + hy.__version__ VERSION = "%(prog)s " + hy.__version__
EPILOG = """ file program read from script EPILOG = """
module module to execute as main file program read from script
- program read from stdin module module to execute as main
[arg] ... arguments passed to program in sys.argv[1:] - program read from stdin
[arg] ... arguments passed to program in sys.argv[1:]
""" """
@ -270,9 +271,8 @@ def cmdline_handler(scriptname, argv):
help="program passed in as a string") help="program passed in as a string")
parser.add_argument("-m", dest="mod", parser.add_argument("-m", dest="mod",
help="module to run, passed in as a string") help="module to run, passed in as a string")
parser.add_argument( parser.add_argument("-i", dest="icommand",
"-i", dest="icommand", help="program passed in as a string, then stay in REPL")
help="program passed in as a string, then stay in REPL")
parser.add_argument("--spy", action="store_true", parser.add_argument("--spy", action="store_true",
help="print equivalent Python code before executing") help="print equivalent Python code before executing")
parser.add_argument("--repl-output-fn", parser.add_argument("--repl-output-fn",