Skip to content

Abbr -q return status inconsistent #8431

@EmilyGraceSeville7cf

Description

@EmilyGraceSeville7cf

Now set --query works as defined below:

-q or --query test if the specified variable names are defined. Does not output anything, but the builtins exit status is the number of variables specified that were not defined, or 255 if more than 255 variables are not defined.

while abbr --query works contradicationary:

-q or --query Return 0 (true) if one of the WORDs is an abbreviation.

Why set --query can't behave more like abbr (check whether at least one variable is defined and return 0 in this case)? It is a breaking change of course and is not a problem when only one thing checked with set/abbr.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething that's not working as intended

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions