10000 tr: GNU refuses sensible longer-than-class input, should we refuse it, too? · Issue #6460 · uutils/coreutils · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
tr: GNU refuses sensible longer-than-class input, should we refuse it, too? #6460
Closed
@BenWiederhake

Description

@BenWiederhake
$ true | cargo run -q tr '[:lower:]a' '[:upper:]'
$ true | tr '[:lower:]a' '[:upper:]'
tr: when translating with string1 longer than string2,
the latter string must not end with a character class
[$? = 1]
$ true | tr -t '[:lower:]a' '[:upper:]'

I see two options:

  • Either we claim this is an extension of tr, in that case we should document it on https://uutils.github.io/coreutils/docs/extensions.html
  • Or this is a bug (because it's a difference in behavior to GNU), then we should fix that. Make sure you catch that weird case where truncating removes the warning again!

Found while reading #6445, even though it wasn't introduced there.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0