-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Convert short options to long ones, 2023 edition #8276
Conversation
94aad3c
to
bdacc23
Compare
Even as a big fan of long options, I have to agree with Eelco's comment on an earlier iteration that some short flags should actually be used, because they're used so frequently that they're worth learning even for a beginner.
All of the other flags, I think we should teach with long names. I suppose there could be disagreement about which short flags. If there is, let's err on the long side. Otherwise pick 3 or 4, but I'd say no more than that. |
@roberth I agree that for a few common and intuitive option make sense to abbreviate them. With the "new" I'm happy to keep the short form |
I actually object. In particular, since |
In that case, I would suggest we go with @roberth's suggestion that if there is [disagreement] let's err on the long side and merge as is. I feel pretty confident that this change represents an overall improvement, even if there remain slight differences in preferences. |
I can't tell if the changes to release notes are accurate, especially old ones. It'd be possible to accidentally change them to long options that didn't exist in those releases. So for historical accuracy it'd be better to leave those untouched. (Or did you/someone actually research this?) Other than that, I don't care too deeply about keeping the frequently used ones. |
That sounds good to me; let's keep the old release notes as is, and do the rest. Thanks @aschmolck for bearing with us so long after the first PR! |
bdacc23
to
98a0961
Compare
e.g. nix-env -e subversion => nix-env --uninstall subversion The aim is to make the documentation less cryptic for newcomers and the long options are more self-documenting. The change was made with the following script: <https://github.com/aschmolck/convert-short-nix-opts-to-long-ones> and sanity checked visually.
98a0961
to
afd9bd7
Compare
Done! |
The `-c` flag belongs to `sh` not `nix shell`. As it stands, the command errors with: ``` $ nix shell nixpkgs#gnumake --command sh --command "cd src && make" sh: --command: invalid option ``` NixOS#8276 was good for readability, but it missed this since that PR used a find/replace script.
The `-c` flag belongs to `sh` not `nix shell`. As it stands, the command errors with: ``` $ nix shell nixpkgs#gnumake --command sh --command "cd src && make" sh: --command: invalid option ``` #8276 was good for readability, but it missed this since that PR used a find/replace script.
The `-c` flag belongs to `sh` not `nix shell`. As it stands, the command errors with: ``` $ nix shell nixpkgs#gnumake --command sh --command "cd src && make" sh: --command: invalid option ``` NixOS#8276 was good for readability, but it missed this since that PR used a find/replace script.
Motivation
e.g. nix-env -e subversion => nix-env --uninstall subversion
The aim is to make the documentation less cryptic for newcomers and the long
options are more self-documenting.
The change was made with the following script:
https://github.com/aschmolck/convert-short-nix-opts-to-long-ones
and sanity checked visually.
Context
This is a 2023 update to #1280.
Checklist for maintainers
Maintainers: tick if completed or explain if not relevant
tests/**.sh
src/*/tests
tests/nixos/*
Priorities
Add 👍 to pull requests you find important.