[Feature Request] Support subcommands without --: query vs --query #290
Labels
No labels
Area/build-packaging
Area/cli
Area/evaluator
Area/fetching
Area/flakes
Area/language
Area/profiles
Area/protocol
Area/releng
Area/remote-builds
Area/repl
Area/store
bug
crash 💥
Cross Compilation
devx
docs
Downstream Dependents
E/easy
E/hard
E/help wanted
E/reproducible
E/requires rearchitecture
imported
Needs Langver
OS/Linux
OS/macOS
performance
regression
release-blocker
RFD
stability
Status
blocked
Status
invalid
Status
postponed
Status
wontfix
testing
testing/flakey
ux
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lix-project/lix#290
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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 tonix-store
it's actually a subcommand ofnix-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.galias 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.
We discussed this among a few team members and came to the conclusion that we are not touching the
nix-
commands likenix-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
, namelynix path-info
as an equivalent fornix-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.