6d5b8484ce7198161d5f617c3db9fd7d3833d48c
- Author
- Ilya Bizyaev <bizyaev@zoho.com>
- Committer
- GitHub <noreply@github.com>
- Date
Message
fix(suse): avoid refresh attempts for Zypper queries (#9798)
Diff
1diff --git a/plugins/suse/README.md b/plugins/suse/README.md
2index b9b069574b362d3fbfff9572b57d406b3685d8d4..06c6d9ef5d5c7f85fc0aace908b0c73aac808e8e 100644
3--- a/plugins/suse/README.md
4+++ b/plugins/suse/README.md
5@@ -2,9 +2,9 @@
6
7 **Maintainer**: [r-darwish](https://github.com/r-darwish)
8
9- Alias for Zypper according to the official Zypper's alias
10+Alias for Zypper according to the official Zypper's alias
11
12- To use it add `suse` to the plugins array in you zshrc file.
13+To use it add `suse` to the plugins array in you zshrc file.
14
15 ```zsh
16 plugins=(... suse)
17@@ -60,6 +60,12 @@ plugins=(... suse)
18 | zse | `zypper se` | search for packages |
19 | zwp | `zypper wp` | list all packages providing the specified capability |
20
21+NOTE: `--no-refresh` is passed to zypper for speeding up the calls and avoid errors due to lack
22+of root privileges. If you need to refresh the repositories, call `sudo zypper ref` (`zref` alias)
23+before runing these aliases.
24+
25+Related: [#9798](https://github.com/ohmyzsh/ohmyzsh/pull/9798).
26+
27 ## Repositories commands
28
29 | Alias | Commands | Description |
30diff --git a/plugins/suse/suse.plugin.zsh b/plugins/suse/suse.plugin.zsh
31index dcfeccb0379ebcba30d0679b10a3460f367e4f19..56bc6f1c5dabadb7a5634780280c0c09ea900d2c 100644
32--- a/plugins/suse/suse.plugin.zsh
33+++ b/plugins/suse/suse.plugin.zsh
34@@ -25,16 +25,16 @@ alias zup='sudo zypper up'
35 alias zpatch='sudo zypper patch'
36
37 #Request commands
38-alias zif='zypper if'
39-alias zpa='zypper pa'
40-alias zpatch-info='zypper patch-info'
41-alias zpattern-info='zypper pattern-info'
42-alias zproduct-info='zypper product-info'
43-alias zpch='zypper pch'
44-alias zpd='zypper pd'
45-alias zpt='zypper pt'
46-alias zse='zypper se'
47-alias zwp='zypper wp'
48+alias zif='zypper --no-refresh if'
49+alias zpa='zypper --no-refresh pa'
50+alias zpatch-info='zypper --no-refresh patch-info'
51+alias zpattern-info='zypper --no-refresh pattern-info'
52+alias zproduct-info='zypper --no-refresh product-info'
53+alias zpch='zypper --no-refresh pch'
54+alias zpd='zypper --no-refresh pd'
55+alias zpt='zypper --no-refresh pt'
56+alias zse='zypper --no-refresh se'
57+alias zwp='zypper --no-refresh wp'
58
59 #Repositories commands
60 alias zar='sudo zypper ar'