Skip to content

Make nix search without search terms show the help message #3553

@milibopp

Description

@milibopp

Is your feature request related to a problem? Please describe.
I noticed that new users are somewhat confused by nix search behaviour, when called without search terms. A common expectation of modern command line tools is that you call them with no arguments to learn more about how to use them. This problem is compounded by the fact, that listing all packages can take some time to evaluate, especially when used with -u, which you are warned about. So a new user notices that they have unintentionally triggered an unknown long-running process, but they only wanted to get a quick information.

Describe the solution you'd like
When there are no search terms, display the help message (like nix search --help) instead of listing all packages.

Describe alternatives you've considered
I see two primary alternatives:

  • Leave as is.
  • Change the behaviour as described and add an option to display all packages (e.g. --all). This could make sense, if people actually use this feature on purpose.

Additional context
n/a

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions