uutils / coreutils

Cross-platform Rust rewrite of the GNU coreutils
https://uutils.github.io/
MIT License
17.79k stars 1.28k forks source link

put "GNU" somewhere in --version #4849

Open Un1q32 opened 1 year ago

Un1q32 commented 1 year ago

In my scripts if I depend on GNU versions of programs I have bits like this

fooversion="$(foo --version)"
case "$fooversion" in
    *GNU*) foo=foo ;;
    *) echo 'incompatable version of foo, please install GNU foo' ; exit 1 ;;
esac

you should add something like "compatible with GNU foo" in the --version menu

LLVM does this

llvm-strip, compatible with GNU strip
LLVM (http://llvm.org/):
  LLVM version 16.0.3
  Optimized build.
tertsdiepraam commented 1 year ago

You specifically check for the GNU implementation and want us to work around that to pass that check? Shouldn't the check just be more lenient then?

Note that even though we strive for compatibility, we aren't 100% there yet, so I think most people would want a check like that to fail explicitly rather than creating problems later. It might make sense to do this later though, once we're confident that we won't silently break too many scripts.