[ruby-core:102170] [Ruby master Feature#17562] Update -E option in --help
From:
mariimaizumi5@...
Date:
2021-01-19 17:38:12 UTC
List:
ruby-core #102170
Issue #17562 has been updated by ima1zumi (Mari Imaizumi).
I need to fix description because --help and -h should be less than 80 characters...
----------------------------------------
Feature #17562: Update -E option in --help
https://bugs.ruby-lang.org/issues/17562#change-90020
* Author: ima1zumi (Mari Imaizumi)
* Status: Open
* Priority: Normal
----------------------------------------
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
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
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:[email protected]?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>