Zypper: Can I add options to config file to be treated as default?

Hello! Is it possible to add zypper options to a config file, so I don’t have to type them down in every install or alias them?

For example, I’d like all installs to have the -y flag. I’ve googled a bit about this and I know it seems to be a tricky option and not really possible, but what about

--details
               Show the detailed installation summary.

I’d like all installs to show a detailed summary but not have to type --details every single time. Is that possible?

thanks a lot in advance!

Some options can, either in /etc/zypp/zypper.conf or ~/.zypper.conf (the latter being user-specific), but it doesn’t seem all can.

1 Like

You could create an alias. E.g.

alias zin='zypper in --details'

Then you can do an install with

zin <packagename>

(Assuming you know what shell aliases are and where to put them when wanted at all login shells. Else ask).

1 Like

Thank you! Is there a list or documentation that I can follow to know wich options I can add to the config file, or should I just use the commented options as reference?

Hey! Thanks a bunch. I was looking to avoid to alias them as stated, but I think this is actually the best course of action. Thanks a lot!

The file seems to be very well self-documented. I’m not aware of any other documentation for it. (Though obviously review of the source would work :slight_smile: )

I admit that I missed your statement “or alias them”. But you do not explain why you do not like that.

In my opinion an alias is in this case easier to create then a script. Of course when you have to fill in parameters in several parts of the command you can not use an alias. But here you have only to add one or more arguments at the end.

And, like @hendersj I think the config files are well documented and contain all there is.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.