That is the wrong command. Use renamerepo. See man zypper:
renamerepo (nr) alias|name|#|URI new-alias
Assign new alias to the repository specified by alias, name, number, or URI.
Examples:
$ zypper nr 8 myrepo
Rename repository number 8 to myrepo (useful if the repo has some dreadful alias which is not usable on the command line).
With modifyrepo you can change the name of a repo.
With renamerepo you can change the alias of a repo.
Man zypper is thousands of lines that is basically unreadable and indecipherable. No one can be expected to search in that. I did change manreader to bat and still can’t read man files well.
You may want to try the online version of manpages at manpages.org which makes it more readable as itt uses your standard browser. There you can better use zoom and search and stuff…
I read man pages using Konqueror. It formats it pretty well and you can then of course use the search functionality of the browser.
E.g. search for “modifyrepo” and with big steps walk to where to command is specified. There you can not find a --alias option at all.
But yes, one has to spend some effort in using some spare time to browse through man pages to get used to them. Not a bad investment when one manages several systems.
Needless to say that I never would compile a statement out of wishful wording and hope then that it will not break things, but as by miracle do what I want to achieve.
Repo files are plain text files. If not managed by a repo service, anything within one that you want changed, and to remain so, including name, alias, URL and enabling state, can be done with a plain text editor.
Easier that than having to first determine which man page is applicable for the various cmdline package management variations and plugins for apt in Debian and dnf in Fedora.
This Reply is not directed at anyone - I quoted to provide context for my Reply
Many folks don’t realize the power (i.e., features) of “man” command. At a CLI prompt, type: “man -h” and you will be presented with over 60 lines of helpful text for starting the man command.
So next, let’s say you execute: “man zypper”. Now tap the "h’ key (for Help) … you are now presented with an overwhelming about of options to choose from. Use the DownArrow / UpArrow key or PageDown / PageUp key to move thru the available options.
I have this “Help section” saved to a text file … it contains 300 lines of text (7 page document) !! A lot detail shown there. man is a lot more competent than some folks realize