From 7578610a45c517ba59f0ce1f082481416e6adcab Mon Sep 17 00:00:00 2001 From: JenChieh Date: Thu, 13 Jun 2024 21:55:57 -0700 Subject: [PATCH] fix: no color prefix --- .../Getting-Started/Basic-Usage/_index.en.md | 52 +++++++++---------- .../Basic-Usage/_index.zh-tw.md | 52 +++++++++---------- eask | 6 +-- src/util.js | 2 +- 4 files changed, 56 insertions(+), 56 deletions(-) diff --git a/docs/content/Getting-Started/Basic-Usage/_index.en.md b/docs/content/Getting-Started/Basic-Usage/_index.en.md index 657625db..5a1c6a52 100644 --- a/docs/content/Getting-Started/Basic-Usage/_index.en.md +++ b/docs/content/Getting-Started/Basic-Usage/_index.en.md @@ -33,22 +33,22 @@ Usage: eask [options..] Commands: analyze [files..] Run Eask checker - archives List out all package archives [aliases: sources] + archives List out all package archives [aliases: sources] clean Delete various files produced during building compile [names..] Byte-compile `.el' files create Create a new elisp project docker [args..] Launch specified Emacs version in a Docker container - docs [names..] Build documentation [aliases: doc] + docs [names..] Build documentation [aliases: doc] emacs [args..] Execute emacs with the appropriate environment eval [form] Evaluate lisp form with a proper PATH - path [patterns..] Print the PATH (exec-path) from workspace [aliases: exec-path] + path [patterns..] Print the PATH (exec-path) from workspace [aliases: exec-path] exec [args..] Execute command with correct environment PATH set up files [patterns..] Print all package files - format Run formatters [aliases: fmt] + format Run formatters [aliases: fmt] generate Generate files that are used for the development info Display information about the current package init [files..] Initialize project to use Eask - install-deps Automatically install package dependencies [aliases: install-dependencies, prepare] + install-deps Automatically install package dependencies [aliases: install-dependencies, prepare] install [names..] Install packages keywords List available keywords that can be used in the header section link Manage links @@ -58,7 +58,7 @@ Commands: load [files..] Load elisp files outdated Show all outdated dependencies package-directory Print path to package directory - package [destination] Build a package artifact, and put it into the given destination [aliases: pack] + package [destination] Build a package artifact, and put it into the given destination [aliases: pack] recipe Suggest a recipe format recompile [names..] Byte-recompile `.el' files refresh Download package archives @@ -67,32 +67,32 @@ Commands: search [queries..] Search packages status Display the state of the workspace test Run regression/unit tests - uninstall [names..] Uninstall packages [aliases: delete] + uninstall [names..] Uninstall packages [aliases: delete] upgrade [names..] Upgrade packages locate Print out Eask installed location - upgrade-eask Upgrade Eask itself [aliases: upgrade-self] + upgrade-eask Upgrade Eask itself [aliases: upgrade-self] Proxy Options: - --proxy update proxy for HTTP and HTTPS to host [string] - --http-proxy update proxy for HTTP to host [string] - --https-proxy update proxy for HTTPS to host [string] - --no-proxy set no-proxy to host [string] + --proxy update proxy for HTTP and HTTPS to host [string] + --http-proxy update proxy for HTTP to host [string] + --https-proxy update proxy for HTTPS to host [string] + --no-proxy set no-proxy to host [string] Options: - --version output version information and exit [boolean] - --help show usage instructions [boolean] - --show-hidden Show hidden commands and options [boolean] - -g, --global change default workspace to ~/.eask/ [boolean] - -c, --config change default workspace to ~/.emacs.d/ [boolean] - -a, --all enable all flag [boolean] - -q, --quick start cleanly without loading the configuration files [boolean] - -f, --force enable force flag [boolean] - --debug turn on debug mode [boolean] - --strict report error instead of warnings [boolean] - --allow-error continue the executioon even there is error reported [boolean] - --insecure allow insecure connection [boolean] - --color enable/disable color output with `--no-` prefix [boolean] - -v, --verbose set verbosity from 0 to 5 [number] + --version output version information and exit [boolean] + --help show usage instructions [boolean] + --show-hidden Show hidden commands and options [boolean] + -g, --global change default workspace to ~/.eask/ [boolean] + -c, --config change default workspace to ~/.emacs.d/ [boolean] + -a, --all enable all flag [boolean] + -q, --quick start cleanly without loading the configuration files [boolean] + -f, --force enable force flag [boolean] + --debug turn on debug mode [boolean] + --strict report error instead of warnings [boolean] + --allow-error continue the executioon even there is error reported [boolean] + --insecure allow insecure connection [boolean] + --no-color enable/disable color output [boolean] + -v, --verbose set verbosity from 0 to 5 [number] For more information, find the manual at https://emacs-eask.github.io/ ``` diff --git a/docs/content/Getting-Started/Basic-Usage/_index.zh-tw.md b/docs/content/Getting-Started/Basic-Usage/_index.zh-tw.md index 0dd8b800..e6413ace 100644 --- a/docs/content/Getting-Started/Basic-Usage/_index.zh-tw.md +++ b/docs/content/Getting-Started/Basic-Usage/_index.zh-tw.md @@ -30,22 +30,22 @@ Usage: eask [options..] Commands: analyze [files..] Run Eask checker - archives List out all package archives [aliases: sources] + archives List out all package archives [aliases: sources] clean Delete various files produced during building compile [names..] Byte-compile `.el' files create Create a new elisp project docker [args..] Launch specified Emacs version in a Docker container - docs [names..] Build documentation [aliases: doc] + docs [names..] Build documentation [aliases: doc] emacs [args..] Execute emacs with the appropriate environment eval [form] Evaluate lisp form with a proper PATH - path [patterns..] Print the PATH (exec-path) from workspace [aliases: exec-path] + path [patterns..] Print the PATH (exec-path) from workspace [aliases: exec-path] exec [args..] Execute command with correct environment PATH set up files [patterns..] Print all package files - format Run formatters [aliases: fmt] + format Run formatters [aliases: fmt] generate Generate files that are used for the development info Display information about the current package init [files..] Initialize project to use Eask - install-deps Automatically install package dependencies [aliases: install-dependencies, prepare] + install-deps Automatically install package dependencies [aliases: install-dependencies, prepare] install [names..] Install packages keywords List available keywords that can be used in the header section link Manage links @@ -55,7 +55,7 @@ Commands: load [files..] Load elisp files outdated Show all outdated dependencies package-directory Print path to package directory - package [destination] Build a package artifact, and put it into the given destination [aliases: pack] + package [destination] Build a package artifact, and put it into the given destination [aliases: pack] recipe Suggest a recipe format recompile [names..] Byte-recompile `.el' files refresh Download package archives @@ -64,32 +64,32 @@ Commands: search [queries..] Search packages status Display the state of the workspace test Run regression/unit tests - uninstall [names..] Uninstall packages [aliases: delete] + uninstall [names..] Uninstall packages [aliases: delete] upgrade [names..] Upgrade packages locate Print out Eask installed location - upgrade-eask Upgrade Eask itself [aliases: upgrade-self] + upgrade-eask Upgrade Eask itself [aliases: upgrade-self] Proxy Options: - --proxy update proxy for HTTP and HTTPS to host [string] - --http-proxy update proxy for HTTP to host [string] - --https-proxy update proxy for HTTPS to host [string] - --no-proxy set no-proxy to host [string] + --proxy update proxy for HTTP and HTTPS to host [string] + --http-proxy update proxy for HTTP to host [string] + --https-proxy update proxy for HTTPS to host [string] + --no-proxy set no-proxy to host [string] Options: - --version output version information and exit [boolean] - --help show usage instructions [boolean] - --show-hidden Show hidden commands and options [boolean] - -g, --global change default workspace to ~/.eask/ [boolean] - -c, --config change default workspace to ~/.emacs.d/ [boolean] - -a, --all enable all flag [boolean] - -q, --quick start cleanly without loading the configuration files [boolean] - -f, --force enable force flag [boolean] - --debug turn on debug mode [boolean] - --strict report error instead of warnings [boolean] - --allow-error continue the executioon even there is error reported [boolean] - --insecure allow insecure connection [boolean] - --color enable/disable color output with `--no-` prefix [boolean] - -v, --verbose set verbosity from 0 to 5 [number] + --version output version information and exit [boolean] + --help show usage instructions [boolean] + --show-hidden Show hidden commands and options [boolean] + -g, --global change default workspace to ~/.eask/ [boolean] + -c, --config change default workspace to ~/.emacs.d/ [boolean] + -a, --all enable all flag [boolean] + -q, --quick start cleanly without loading the configuration files [boolean] + -f, --force enable force flag [boolean] + --debug turn on debug mode [boolean] + --strict report error instead of warnings [boolean] + --allow-error continue the executioon even there is error reported [boolean] + --insecure allow insecure connection [boolean] + --no-color enable/disable color output [boolean] + -v, --verbose set verbosity from 0 to 5 [number] For more information, find the manual at https://emacs-eask.github.io/ ``` diff --git a/eask b/eask index bbe3e94e..4a7530b7 100644 --- a/eask +++ b/eask @@ -90,10 +90,9 @@ yargs type: 'boolean', hidden: true, }, - 'color': { - description: 'enable/disable color output with `--no-` prefix', + 'no-color': { + description: 'enable/disable color output', type: 'boolean', - prefix: 'no', }, 'verbose': { description: `set verbosity from 0 to 5`, @@ -124,6 +123,7 @@ yargs group: TITLE_PROXY_OPTION, }, }) + .parserConfiguration({ "boolean-negation": false }) .strict() .demandCommand() .showHelpOnFail(true) diff --git a/src/util.js b/src/util.js index 0ad0a908..b4037b3f 100644 --- a/src/util.js +++ b/src/util.js @@ -166,7 +166,7 @@ function _global_options(argv) { flags.push(def_flag(argv['log-level'], (argv['log-level']) ? '--log-level' : '--no-log-level')); flags.push(def_flag(argv['log-file'], (argv['log-file']) ? '--log-file' : '--no-log-file')); flags.push(def_flag(argv['elapsed-time'], (argv['elapsed-time']) ? '--elapsed-time' : '--no-elapsed-time')); - flags.push(def_flag(argv['color'], '--no-color')); + flags.push(def_flag(argv['no-color'], '--no-color')); /* Number type */ flags.push(def_flag(argv.verbose, '--verbose', argv.verbose)); /* String type */