[Groonga-commit] groonga/gcs [master] Register the default usage by CommandLineInterface itself

Back to archive index

null+****@clear***** null+****@clear*****
2012年 8月 6日 (月) 17:29:17 JST


SHIMODA Hiroshi	2012-08-06 17:29:17 +0900 (Mon, 06 Aug 2012)

  New Revision: 01e15552b1cf4fad213cf82050f44c62168eaa00
  https://github.com/groonga/gcs/commit/01e15552b1cf4fad213cf82050f44c62168eaa00

  Log:
    Register the default usage by CommandLineInterface itself

  Modified files:
    bin/cs-describe-domain
    bin/gcs
    lib/command-line.js

  Modified: bin/cs-describe-domain (+0 -1)
===================================================================
--- bin/cs-describe-domain    2012-08-06 17:23:57 +0900 (6ba9890)
+++ bin/cs-describe-domain    2012-08-06 17:29:17 +0900 (bb8b2fb)
@@ -4,7 +4,6 @@ var CLI = require(__dirname + '/../lib/command-line').CommandLineInterface;
 var commandLine = new CLI();
 
 commandLine
-  .usage('[options]')
   .option('-d, --domain-name <domain name>',
           'The name of the domain that you are creating. Required.',
           String)

  Modified: bin/gcs (+0 -1)
===================================================================
--- bin/gcs    2012-08-06 17:23:57 +0900 (084a135)
+++ bin/gcs    2012-08-06 17:29:17 +0900 (8ae6380)
@@ -5,7 +5,6 @@ var CLI = require(__dirname + '/../lib/command-line').CommandLineInterface;
 var commandLine = new CLI();
 
 commandLine
-  .usage('[options]')
   .option('-p, --port <port>',
           'specify port [7575]',
           Number,

  Modified: lib/command-line.js (+2 -0)
===================================================================
--- lib/command-line.js    2012-08-06 17:23:57 +0900 (8b9c902)
+++ lib/command-line.js    2012-08-06 17:29:17 +0900 (615c8e8)
@@ -36,6 +36,8 @@ CommandLineInterface.prototype = {
 
     if (this.reservedUsage)
       this.program.usage.apply(this.program, this.reservedUsage);
+    else
+      this.program.usage('[options]');
 
     this.reservedOptions.forEach(function(optionArguments) {
       this.program.option.apply(this.program, optionArguments);
-------------- next part --------------
HTML$B$NE:IU%U%!%$%k$rJ]4I$7$^$7$?(B...
下載 



Groonga-commit メーリングリストの案内
Back to archive index