From b372ecdf95a8c9f143fd5d62f512dd30b47d6c83 Mon Sep 17 00:00:00 2001 From: "sgjesse@chromium.org" Date: Thu, 18 Dec 2008 10:39:11 +0000 Subject: [PATCH] Added option --shell to D8 and updated the usage text. Review URL: http://codereview.chromium.org/14192 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@998 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/d8.cc | 4 +++- src/flags.cc | 7 ++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/d8.cc b/src/d8.cc index 164dd0689..9e392f616 100644 --- a/src/d8.cc +++ b/src/d8.cc @@ -433,7 +433,9 @@ int Shell::Main(int argc, char* argv[]) { Context::Scope context_scope(evaluation_context_); for (int i = 1; i < argc; i++) { char* str = argv[i]; - if (strcmp(str, "-f") == 0) { + if (strcmp(str, "--shell") == 0) { + run_shell = true; + } else if (strcmp(str, "-f") == 0) { // Ignore any -f flags for compatibility with other stand-alone // JavaScript engines. continue; diff --git a/src/flags.cc b/src/flags.cc index 48b4ef743..cb461ee0c 100644 --- a/src/flags.cc +++ b/src/flags.cc @@ -516,10 +516,11 @@ void FlagList::PrintHelp() { printf(" shell [options] file1 file2 ... filek\n"); printf(" run JavaScript scripts in file1, file2, ..., filek\n"); printf(" shell [options]\n"); - printf(" shell [options] --shell\n"); - printf(" run an interactive JavaScript shell"); - printf(" d8 [options] file\n"); + printf(" shell [options] --shell [file1 file2 ... filek]\n"); + printf(" run an interactive JavaScript shell\n"); + printf(" d8 [options] file1 file2 ... filek\n"); printf(" d8 [options]\n"); + printf(" d8 [options] --shell [file1 file2 ... filek]\n"); printf(" run the new debugging shell\n\n"); printf("Options:\n"); for (size_t i = 0; i < num_flags; ++i) { -- 2.34.1