-
Notifications
You must be signed in to change notification settings - Fork 1
Rename nix profile install
to nix profile add
#24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
9ecb8ff
to
0e8a13a
Compare
0e8a13a
to
7b0d72e
Compare
This PR is hard to review with the formatting changes. |
7b0d72e
to
b454ae9
Compare
@edolstra fixed! |
b454ae9
to
8443f01
Compare
src/nix/profile.cc
Outdated
{"remove", []() { return make_ref<CmdProfileRemove>(); }}, | ||
{"upgrade", []() { return make_ref<CmdProfileUpgrade>(); }}, | ||
{"list", []() { return make_ref<CmdProfileList>(); }}, | ||
{"diff-closures", []() { return make_ref<CmdProfileDiffClosures>(); }}, | ||
{"history", []() { return make_ref<CmdProfileHistory>(); }}, | ||
{"rollback", []() { return make_ref<CmdProfileRollback>(); }}, | ||
{"wipe-history", []() { return make_ref<CmdProfileWipeHistory>(); }}, | ||
// 2025-04-05 Deprecated in favor of "add" | ||
{"install", []() { return make_ref<CmdProfileAdd>(); }}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's better to do this as a proper alias (see aliases
in main.cc
), otherwise nix profile install
shows up as its own manual page which is probably not what we want. However aliases
currently only handles top-level commands I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it does only handle top-level commands at the moment. That'd be a great thing to fix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@grahamc Okay, I've made it a proper alias.
nix profile install
to nix profile add
.nix profile install
to nix profile add
This allows subcommands to declare aliases, e.g. `nix store ping` is now a proper alias of `nix store info`.
1fa9b5a
to
497fe6d
Compare
Motivation
The verb
add
is a better antonym for the verbremove
. Nix also does not have install hooks or general behavior often associated with "installing".Context
I've had (and heard) concerns before about add/remove vs. install/remove confusion. Sharing the video about the
git add
video fix had Carl Hedgren suggesting it on Twitter.