Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(151)

Unified Diff: mojo/devtools/common/mojo_run

Issue 1343933003: Don't hard-code usage string in mojo_run. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Address Ben's comments. Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/devtools/common/mojo_run
diff --git a/mojo/devtools/common/mojo_run b/mojo/devtools/common/mojo_run
index 0982ee6960acd2d5d9dd17dac14da9212803ac45..06bc6275b22ec17f9e552267fd07a89c32e1b5b6 100755
--- a/mojo/devtools/common/mojo_run
+++ b/mojo/devtools/common/mojo_run
@@ -10,28 +10,22 @@ import sys
from devtoolslib import shell_arguments
from devtoolslib import shell_config
-_USAGE = ("mojo_run "
- "[--args-for=<mojo-app>] "
- "[--content-handlers=<handlers>] "
- "[--enable-external-applications] "
- "[--disable-cache] "
- "[--enable-multiprocess] "
- "[--wait-for-debugger] "
- "[--sky <mojo-app>|<mojo-app>] "
- """
-
-A <mojo-app> is a Mojo URL or a Mojo URL and arguments within quotes.
-Example: mojo_run "mojo:js_standalone test.js".
-<url-lib-path> is searched for shared libraries named by mojo URLs.
-The value of <handlers> is a comma separated list like:
-text/html,mojo:html_viewer,application/javascript,mojo:js_content_handler
-""")
-
_DESCRIPTION = """Runner for Mojo applications.
Any arguments not recognized by the script will be passed on as shell arguments.
-"""
+Important shell arguments include:
+ "--args-for=<mojo-app-url> <arguments>"
+ "--content-handlers=<handlers>"
+ "--disable-cache"
+ "--enable-multiprocess"
+ "--wait-for-debugger"
+ "<mojo-app-url>"
+ "<mojo-app-url> <arguments>"
+
+The value of <handlers> is a comma separated list like:
+text/html,mojo:html_viewer,application/javascript,mojo:js_content_handler
+"""
# Port on which the mojo:debugger http server will be available on the host
# machine.
@@ -58,7 +52,9 @@ def _configure_debugger(shell):
def main():
logging.basicConfig()
- parser = argparse.ArgumentParser(usage=_USAGE, description=_DESCRIPTION)
+ parser = argparse.ArgumentParser(
+ formatter_class=argparse.RawDescriptionHelpFormatter,
+ description=_DESCRIPTION)
shell_config.add_shell_arguments(parser)
parser.add_argument('--embed', type=str,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698