Skip to content

test --help emits no output #6114

Closed
Closed

Description

@mqudsi

With the documentation built and installed, test --help emits no output and exits without any errors, setting $status to 0.

Activity

  1. floam commented on Sep 14, 2019

    @floam
    Member

    This is by design. test $x returns 0 if x is not empty. "--help" is not empty. It would break compatibility with POSIX test and existing uses in fish.

  2. floam commented on Sep 14, 2019

    @floam
    Member

    Note that all of the switches test works on require another argument. test -f with no more arguments is not checking for a file or going to report an error about a missing argument. It's returning 0 because -f is not empty.

  3. mqudsi commented on Sep 18, 2019

    @mqudsi
    ContributorAuthor

    Would it really break existing uses, though? All of our other builtins require -- to allow parameters that look like switches; here we would only be special-casing a single switch, and we can allow for -- to separate payloads from parameters, if needed.

  4. faho commented on Sep 18, 2019

    @faho
    Member

    Yes, it would.

    test fundamentally sucks, let's not try to paint lipstick on a pig.

  5. faho commented on Sep 19, 2019

    @faho
    Member

    In particular, test does not support --.

    So because this necessitates a compatibility break, let's close this. Personally, I'd recommend looking for alternatives to test instead.

  6. added this to the will-not-implement milestone on Sep 19, 2019
  7. locked as resolved and limited conversation to collaborators on Apr 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions