pkg
pkg copied to clipboard
pkg -y install ... -> pkg install -y ...
It would be nice if pkg(1) forwarded common flags like -y to subcommands that accepted them.
how about ASSUME_ALWAYS_YES=YES pkg whatever ?
I don't think ASSUME_ALWAYS_YES has anything to do with this issue.
Well as far as I understand ASSUME_ALWAYS_YES cover every use case you provided, so maybe some clarifications and well chosen examples could help. Also note that it's pkg(8), not pkg(1).
@cemeyer Could you please explain why @kAworu's answer does not satisfy you? In the end, you get the result you want. Or maybe you want a -y flag, in which case you should state this more explicitly.
pkg-fetch, pkg-install, pkg-delete all take -y flags; but pkg -y <install|fetch|delete> does the wrong thing.
pkg-install, pkg-update, and pkg-delete all take -f|--force flags, but pkg -f <install|update|delete> does the wrong thing.
Do you need more examples or does that make sense? A -y flag to pkg would improve things, but it isn't a complete fix. ASSUME_ALWAYS_YES isn't related.
I am using the -o ... flag to "simulate" -y, something like pkg -o ASSUME_ALWAYS_YES=true install <pkg_name>, this fits my needs nicely. However in the pkg.conf manpage (FBSD12) this option is decribed like this:
ASSUME_ALWAYS_YES: boolean When this option is enabled pkg(1) will automatically assume "yes" to all questions which require user confirmation before doing anything, as if it the -y flag was specified. Default: NO.
This sounds as if there is a -y flag, but it is not mentioned in the pkg manpage. I could not find anything in the sourcecode either.
i just discovered, there is the flag -y, --yes mentioned in the pkg-update, pkg-delete, pkg-upgrade manpages. And my comment has not much in common with the topic of the ticket itself, sorry.
I don't really understand what is being asked for here? do you ask to have global options aka pkg
@bapt yes, and (or?) that pkg forwards those to sub-commands that understand them