Skip to content
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

opam list --silent should be --check #4323

Closed
dra27 opened this issue Aug 19, 2020 · 4 comments · Fixed by #4595
Closed

opam list --silent should be --check #4323

dra27 opened this issue Aug 19, 2020 · 4 comments · Fixed by #4595
Assignees
Labels
Milestone

Comments

@dra27
Copy link
Member

dra27 commented Aug 19, 2020

For better or worse, the option added in #3533 should more consistently have been --check (display nothing, communicate in exit code only). This can be renamed for 2.1 using CLI versioning.

@dra27 dra27 added the AREA: UI label Aug 19, 2020
@dra27 dra27 added this to the 2.1.0~beta milestone Aug 19, 2020
@rjbou
Copy link
Collaborator

rjbou commented Aug 20, 2020

It should be --check-[package-existence], because opam list isn't supposed to check things, it can be not obvious what is checked.

@rjbou rjbou modified the milestones: 2.1.0~beta, 2.1.0~beta2 Aug 26, 2020
@rjbou rjbou modified the milestones: 2.1.0~beta2, 2.1.0~beta3 Sep 14, 2020
@AltGr
Copy link
Member

AltGr commented Oct 16, 2020

Just to add some inputs, this is from the grep manpage:

       -q, --quiet, --silent
              Quiet; do not write anything to standard output.  Exit immediately with zero status if any match is found, even if an error was detected.  Also see the -s or --no-messages option.
       -c, --count
              Suppress normal output; instead print a count of matching lines for each input file.  With the -v, --invert-match option (see below), count non-matching lines.

@dra27 dra27 modified the milestones: 2.1.0~beta4, 2.1.0~beta5 Nov 13, 2020
@dra27 dra27 self-assigned this Feb 5, 2021
@kit-ty-kate
Copy link
Member

kit-ty-kate commented Feb 7, 2021

I think --silent is an ok name and i agree with @AltGr it matches up with grep.
In my opinion, --check would not be a good name because if I were just to read the command (e.g. opam list --check --installable --depends-on pkg) I would instinctively think the --check command is just there to do extra checks or something, not that it would not write anything to stdout.

Personally I would be in favour of closing this issue.

@dra27
Copy link
Member Author

dra27 commented Feb 7, 2021

I don't recall if this arose from a discussion, or just from the complete review of the CLI options added since 2.0 which I did when adding CLI versioning, but closing this doesn't resolve the inconsistency between opam {update,install,env} --check with opam list --check inexplicably called opam list --silent... for comparing other CLIs, cf. *sum --check, but the concern was having two names in different parts of the CLI for the same function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants