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

RFE: Make table style selection a config option #471

Open
bertronika opened this issue Dec 3, 2022 · 7 comments
Open

RFE: Make table style selection a config option #471

bertronika opened this issue Dec 3, 2022 · 7 comments

Comments

@bertronika
Copy link

Zypper has the (little known) -s, --table-style argument for changing the characters used when a table is drawn in the command output. I currently set my table style with a shell alias, but doing so presents two problems:

  • I cannot run any subcommand (zypper prints Subcommand ... does not support zypper global options. and terminates)
  • shell alias doesn't get applied when I call zypper with sudo (as I don't forward aliases to the root session)

I'm suggesting making the table style setting a config option (in zypper.conf). It would help with the discoverability of the setting, prevent conflicts with subcommands and unify zypper's appearance no matter how it is invoked.

@luc14n0
Copy link

luc14n0 commented Dec 6, 2022

Out of curiosity, what shell are you using and how are you setting the alias.

@bertronika
Copy link
Author

It's bash, with alias zypper='zypper -s 1' defined.

@luc14n0
Copy link

luc14n0 commented Dec 7, 2022

OK, thanks.

I'm guessing that in order to having this as a configuration in zypp.conf, that limitation Zypper has about not supporting global options for sub-commands must be dealt with first. Zypper`s manpage states:

Using zypper global-options together with subcommands, as well as
executing subcommands in zypper shell is currently not supported.

Just like you see in the error message you're getting. But now I'm curious to now what are those limitations.

@mlandres
Copy link
Member

mlandres commented Dec 7, 2022

You cant deal with this. A subcommand is a standalone program or shell script (like zypper-log). You can even write your own ones. We have no control about what options those programs support. We (the zypp-team) neither provide nor maintain most of them.

@luc14n0
Copy link

luc14n0 commented Dec 7, 2022

That was the first thing that came to my mind, the "unknown" factor.

@bertronika
Copy link
Author

We have no control about what options those programs support.

That's why I'm proposing a change, internal to zypper. I've picked zypper.conf because it already contains color configuration, and table style would complement it. By making it an entry in the configuration file, no more aliases with global options, which conflict with subcommands, would be necessary.

@luc14n0
Copy link

luc14n0 commented Dec 9, 2022

Could that work out Michael? It kind of makes sense to have this as an option in zypper.conf to avoid that conflict IMO, since it wouldn't be Zypper outputting text, right?. How does Zypper handle sub-commands, is it just like a simple wrapper, or does it do something special?

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

No branches or pull requests

3 participants