https://bugs.ruby-lang.org/https://bugs.ruby-lang.org/favicon.ico?17113305112014-06-19T11:09:24ZRuby Issue Tracking SystemRuby master - Feature #9960: Add support for GNU --long optionshttps://bugs.ruby-lang.org/issues/9960?journal_id=472892014-06-19T11:09:24Zjaalto (Jari Aalto)jari.aalto@cante.net
<ul></ul><p>[With markup]</p>
<p>Please consider adding GNU --long option equivalents. Notes:</p>
<ul>
<li>Prefer uppercase "V" for version, as small "v" is customarily user for --verbose.</li>
<li>Change word "switches" into more commonly used "options" word in USAGE line.</li>
</ul>
<p><strong>SUGGESTIONS</strong></p>
<pre><code>Usage: ruby [switches] [--] [programfile] [arguments]
-0[octal] specify record separator (\0, if no argument)
-a, --autosplit
autosplit mode with -n or -p (splits $_ into $F)
-c, --check
check syntax only
-Cdirectory, --directory DIRECTORY
cd to directory before executing your script
-d, --debug
set debugging flags (set $DEBUG to true)
-e 'command', --eval
one line of script. Several -e's allowed. Omit [programfile]
-Eex[:in], --encoding [EXTERNAL:INTERNAL]
specify the default external and internal character encodings
-Fpattern, --autosplit-pattern PATTERN
split() pattern for autosplit (-a)
-i[extension], --in-place [EXTENSION]
edit ARGV files in place (make backup if extension supplied)
-Idirectory, --include DIRECTORY
specify $LOAD_PATH directory (may be used more than once)
-l, --eol-processing
enable line ending processing
-n, --autoloop-noprint
assume 'while gets(); ... end' loop around your script
-p, --autoloop
assume loop like -n but print line also like sed
-rlibrary, --require LIBRARY
require the library before executing your script
-s, --switch-parse
enable some switch parsing for switches after script name
-S, --search-path
look for the script using PATH environment variable
-T[level=1], --taint [NUMBER]
turn on tainting checks
-V, --version
print version number, then turn on verbose mode
-w, --warning
turn warnings on for your script
-W[level=2], --warning-level [NUMBER]
set warning level; 0=silence, 1=medium, 2=verbose
-x[directory], --extract [DIRECTORY]
strip off text before #!ruby line and perhaps cd to directory
-h, --help
show this message, --help for more info
</code></pre> Ruby master - Feature #9960: Add support for GNU --long optionshttps://bugs.ruby-lang.org/issues/9960?journal_id=472902014-06-19T11:28:11Znobu (Nobuyoshi Nakada)nobu@ruby-lang.org
<ul><li><strong>Description</strong> updated (<a title="View differences" href="/journals/47290/diff?detail_id=34135">diff</a>)</li><li><strong>Status</strong> changed from <i>Open</i> to <i>Feedback</i></li><li><strong>Priority</strong> changed from <i>Normal</i> to <i>3</i></li></ul><p>Jari Aalto wrote:</p>
<blockquote>
<p>Please consider adding GNU --long option equivalents. Notes:</p>
<ul>
<li>Prefer uppercase "V" for version, as small "v" is customarily user for --verbose.</li>
</ul>
</blockquote>
<p>What do you mean by "customarily user"?<br>
Options for ruby cannot be customized by users.</p> Ruby master - Feature #9960: Add support for GNU --long optionshttps://bugs.ruby-lang.org/issues/9960?journal_id=472912014-06-19T11:30:16Znobu (Nobuyoshi Nakada)nobu@ruby-lang.org
<ul></ul><p>Jari Aalto wrote:</p>
<blockquote>
<ul>
<li>Prefer uppercase "V" for version, as small "v" is customarily user for --verbose.</li>
</ul>
</blockquote>
<p>'-v' is verbose option now.</p> Ruby master - Feature #9960: Add support for GNU --long optionshttps://bugs.ruby-lang.org/issues/9960?journal_id=473102014-06-20T20:37:00Zavit (Andrew Vit)andrew@avit.ca
<ul></ul><p><a class="user active user-mention" href="https://bugs.ruby-lang.org/users/4">@nobu (Nobuyoshi Nakada)</a> "customarily" means "commonly" (English noun "a custom" vs. adjective "custom": <em>a traditional and widely accepted way of behaving or doing something that is specific to a particular society, place, or time</em>)</p>
<p>It is true that most often -v means --verbose and -V means --version but it's not consistent, and not sure it's worth changing now.</p> Ruby master - Feature #9960: Add support for GNU --long optionshttps://bugs.ruby-lang.org/issues/9960?journal_id=473132014-06-21T02:06:53Zmame (Yusuke Endoh)mame@ruby-lang.org
<ul></ul><blockquote>
<p>Prefer uppercase "V" for version, as small "v" is customarily user for --verbose.</p>
</blockquote>
<p>I don't think the convention is common. I investigated some compilers and interpreters:</p>
<p>-v users:</p>
<ul>
<li>ruby: -v, --version</li>
<li>perl: -v, -version, --version</li>
<li>lua: -v</li>
<li>php: -v, --version</li>
<li>guile: -v, --version</li>
<li>gst: -v, -version, --version</li>
<li>coffee: -v, -version, --version</li>
<li>gforth: -v, -version, --version</li>
<li>groovy: -v, -version, --version</li>
<li>nodejs: -v, --version</li>
<li>ocamlc: -v, -version, -vnum</li>
<li>octave: -v, -version, --version</li>
<li>pike: -v, --version, -version</li>
<li>tcc: -v, -version</li>
</ul>
<p>-V users:</p>
<ul>
<li>python: -V, --version</li>
<li>gosh: -V</li>
<li>iverilog: -V</li>
<li>gawk: -V --version</li>
<li>cobc: -V, -version, --version</li>
<li>ghc: -V, --version</li>
<li>icont: -V</li>
<li>parrot: -V, --version</li>
</ul>
<p>others that do not use -V nor -v:</p>
<ul>
<li>scala: -version</li>
<li>valac: --version</li>
<li>gcc: --version</li>
<li>mcs: --version</li>
<li>clisp: --version</li>
<li>gfortran: --version</li>
<li>javac: -version</li>
<li>fpc: -iV</li>
<li>R: --version</li>
</ul>
<p>Especially, some GNU projects (guile, GNU Smalltalk, and gforth) use "V" for verbose, and "v" for version.</p>
<p>--<br>
Yusuke Endoh <a href="mailto:mame@ruby-lang.org" class="email">mame@ruby-lang.org</a></p>