andrewgregory / pacutils

Helper library for libalpm based programs.
MIT License
107 stars 17 forks source link

Feature request: Add the following prompt disposition option #37

Open Volker-Weissmann opened 4 years ago

Volker-Weissmann commented 4 years ago

In the manpage in the section Prompt Disposition Options, there are options to auto-confirm the following question: --resolve-conflicts --resolve-replacements --install-ignored-packages --delete-corrupt-files --use-first-provider --skip-unresolvable --import-pgp-keys And there is the --yolo option to confirm everything. Sadly, I couldn't find an option to auto-confirm the following type of question:

installing community/cloc (1.84-1)

Download Size: 0.00 B Installed Size: 544.00 K Size Delta: 544.00 K

:: Proceed with transaction? [Y/n] Y

--yolo auto-confirms this question, but it would be nice if there was an option to auto-confirm the question above without auto-confirming the other questions.

Use case: If you write a script that installs something, you maybe want to prompt (or exit with non-zero exit code) if there is a real problem like a conflict, but confirm if there aren't any real problems.

andrewgregory commented 2 years ago

What should this setting be called? Every option I come up with is either semantically confusing or would cause confusion with the existing --noconfirm option (which I don't to change to avoid confusion between pacinstall and pacman).

Volker-Weissmann commented 2 years ago

Maybe --script-mode or --noninteracttive or --interactive=false?

andrewgregory commented 2 years ago

Those names are all far too broad to adjust just the one prompt. Ideally the option would fallow the same prompt|yes|no scheme as the other settings.

Volker-Weissmann commented 2 years ago

--proceed-with-transaction?