From: "nobu (Nobuyoshi Nakada) via ruby-core" Date: 2023-06-07T23:46:52+00:00 Subject: [ruby-core:113798] [Ruby master Feature#19718] Extend `-0` option Issue #19718 has been updated by nobu (Nobuyoshi Nakada). Dan0042 (Daniel DeLorme) wrote in #note-3: > I meant it will not be possible to use `-u` in the future. Yes, and I thought it wouldn���t be a problem, but might not be a good idea. > With colon we could write anything after, like `-0:$'\t'` or `-0:011` or `-0:x09` or `-0:u0009` or `-0:b1001` ���� > Or use `=` instead of `:` ? `-0=$'\t'` and `-0:09`(= `-0:x09`)? ---------------------------------------- Feature #19718: Extend `-0` option https://bugs.ruby-lang.org/issues/19718#change-103444 * Author: nobu (Nobuyoshi Nakada) * Status: Open * Priority: Normal ---------------------------------------- Recently I learned that Perl's `-0` option is extended to accept a hexadecimal Unicode codepoint. However it uses `-0x`, and since `-x` is used for shebang and cd, it would cause a backward incompatibility if we will incorporate it as it is. So I propose that `-0uCODEPOINT` instead. This can be extended to comma- or colon-separated codepoint list. Also, another idea is `-0:sepaerator` which specifies the separator as-is. Considering many of modern shells provide escaped string form (e.g., `$'\uHHHH'), this may be a more modern answer, except for NUL cannot be represented. https://github.com/ruby/ruby/pull/7914 -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/