Project

General

Profile

Actions

Feature #17562

open

Update -E option in --help

Added by ima1zumi (Mari Imaizumi) almost 4 years ago. Updated almost 4 years ago.

Status:
Open
Assignee:
-
Target version:
-
[ruby-core:102168]

Description

I would like to propose explaining the arguments of the -E option specifically in --help.

The current explanation is a bit difficult for beginners to understand.
I tried to change Encoding.default_internal, but I changed Encoding.default_external by mistake. That confused me because I didn't know how to use it. Therefore, I have updated the explanation.

before:

  -Eex[:in], --encoding=ex[:in]
                  specify the default external and internal character encodings

after:

  -Eexternal-encoding[:internal-encoding], --encoding=external-encoding[:internal-encoding]
                  specify the default external and internal character encodings

diff:

diff --git a/ruby.c b/ruby.c
index 5bac96b5e1..4f8975a399 100644
--- a/ruby.c
+++ b/ruby.c
@@ -281,7 +281,7 @@ usage(const char *name, int help, int highlight, int columns)
        M("-Cdirectory",   "",                     "cd to directory before executing your script"),
        M("-d",            ", --debug",            "set debugging flags (set $DEBUG to true)"),
        M("-e 'command'",  "",                     "one line of script. Several -e's allowed. Omit [programfile]"),
-       M("-Eex[:in]",     ", --encoding=ex[:in]", "specify the default external and internal character encodings"),
+       M("-Eexternal-encoding[:internal-encoding]",", --encoding=external-encoding[:internal-encoding]","specify the default external and internal character encodings"),
        M("-Fpattern",     "",                     "split() pattern for autosplit (-a)"),
        M("-i[extension]", "",                     "edit ARGV files in place (make backup if extension supplied)"),
        M("-Idirectory",   "",                     "specify $LOAD_PATH directory (may be used more than once)"),

PR: https://github.com/ruby/ruby/pull/4099

Actions

Also available in: Atom PDF

Like0
Like0Like0