[Feature Request] Support subcommands without --: query vs --query #290

Closed
opened 2024-05-09 22:03:26 +00:00 by Ghost · 1 comment

When using nix, it's difficult to tell apart the subcommands from the options. One has to read every option to determine whether it is actually an option or a subcommand. For example nix-store --query is not an option to nix-store it's actually a subcommand of nix-store

Describe the solution you'd like

Remove the -- from subcommands or at least support calling subcommands without -- and update the documentation to use the newer form.

Describe alternatives you've considered

Writing an overlay command with the new CLI that passes calls to nix-store (or other nix commands) e.g alias nix-store=my-nix-store

Additional context

Modern command line interfaces are much clearer than they were 20 years ago. It will help newcomers (like me) to have a more up to date command line interface that's comparable to new CLIs.

## Is your feature request related to a problem? Please describe. When using nix, it's difficult to tell apart the subcommands from the options. One has to read every option to determine whether it is actually an option or a subcommand. For example `nix-store --query` is not an option to `nix-store` it's actually a subcommand of `nix-store` ## Describe the solution you'd like Remove the `--` from subcommands or at least support calling subcommands without `--` and update the documentation to use the newer form. ## Describe alternatives you've considered Writing an overlay command with the new CLI that passes calls to `nix-store` (or other nix commands) e.g `alias nix-store=my-nix-store` ## Additional context Modern command line interfaces are much clearer than they were 20 years ago. It will help newcomers (like me) to have a more up to date command line interface that's comparable to new CLIs.
Owner

We discussed this among a few team members and came to the conclusion that we are not touching the nix- commands like nix-store, nix-build, nix-instantiate in any significant way, for a few reasons, but primarily that their code quality and UX design is very poor and they are stable and widely used so touching them is liable to regress two decades of scripts. Correct me if I'm wrong, but I think that the request that you actually have is that there should be a sensibly modern and not funny-looking CLI available?

This exists as nix-command, namely nix path-info as an equivalent for nix-store --query.

The entire "nix3" (nix *) CLI is currently in the process of (admittedly slow, and at this point unlikely to break very hard) revision, and we need to better document the equivalences between old and new commands. I have filed #291 as a feature request to be able to convert between the command syntaxes.

We discussed this among a few team members and came to the conclusion that we are not touching the `nix-` commands like `nix-store`, `nix-build`, `nix-instantiate` in any significant way, for a few reasons, but primarily that their code quality *and* UX design is very poor and they are stable and widely used so touching them is liable to regress two decades of scripts. Correct me if I'm wrong, but I think that the request that you actually have is that there should be a sensibly modern and not funny-looking CLI available? This exists as `nix-command`, namely `nix path-info` as an equivalent for `nix-store --query`. The entire "nix3" (`nix *`) CLI is currently in the process of (admittedly slow, and at this point unlikely to break very hard) revision, and we need to better document the equivalences between old and new commands. I have filed https://git.lix.systems/lix-project/lix/issues/291 as a feature request to be able to convert between the command syntaxes.
jade closed this issue 2024-05-09 22:47:35 +00:00
jade added the
Status
wontfix
label 2024-05-09 22:47:39 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lix-project/lix#290
No description provided.