Skip to content

Commit

Permalink
fix(suse): avoid refresh attempts for Zypper queries (ohmyzsh#9798)
Browse files Browse the repository at this point in the history
  • Loading branch information
IlyaBizyaev committed Aug 20, 2021
1 parent cbb5342 commit 6d5b848
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 12 deletions.
10 changes: 8 additions & 2 deletions plugins/suse/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

**Maintainer**: [r-darwish](https://github.com/r-darwish)

Alias for Zypper according to the official Zypper's alias
Alias for Zypper according to the official Zypper's alias

To use it add `suse` to the plugins array in you zshrc file.
To use it add `suse` to the plugins array in you zshrc file.

```zsh
plugins=(... suse)
Expand Down Expand Up @@ -60,6 +60,12 @@ plugins=(... suse)
| zse | `zypper se` | search for packages |
| zwp | `zypper wp` | list all packages providing the specified capability |

NOTE: `--no-refresh` is passed to zypper for speeding up the calls and avoid errors due to lack
of root privileges. If you need to refresh the repositories, call `sudo zypper ref` (`zref` alias)
before runing these aliases.

Related: [#9798](https://github.com/ohmyzsh/ohmyzsh/pull/9798).

## Repositories commands

| Alias | Commands | Description |
Expand Down
20 changes: 10 additions & 10 deletions plugins/suse/suse.plugin.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@ alias zup='sudo zypper up'
alias zpatch='sudo zypper patch'

#Request commands
alias zif='zypper if'
alias zpa='zypper pa'
alias zpatch-info='zypper patch-info'
alias zpattern-info='zypper pattern-info'
alias zproduct-info='zypper product-info'
alias zpch='zypper pch'
alias zpd='zypper pd'
alias zpt='zypper pt'
alias zse='zypper se'
alias zwp='zypper wp'
alias zif='zypper --no-refresh if'
alias zpa='zypper --no-refresh pa'
alias zpatch-info='zypper --no-refresh patch-info'
alias zpattern-info='zypper --no-refresh pattern-info'
alias zproduct-info='zypper --no-refresh product-info'
alias zpch='zypper --no-refresh pch'
alias zpd='zypper --no-refresh pd'
alias zpt='zypper --no-refresh pt'
alias zse='zypper --no-refresh se'
alias zwp='zypper --no-refresh wp'

#Repositories commands
alias zar='sudo zypper ar'
Expand Down

0 comments on commit 6d5b848

Please sign in to comment.