b3d3ce8aa604aecc52c132a9d67e075b0ca64722

Author
Braxton Schafer <braxton@epic.com>
Committer
Braxton Schafer <braxton@epic.com>
Date

Message

Fix bad function definitions in Debian plugin

There appears to be a definition issue for some functions/aliases which
result in the following errors when sourcing .zshrc:

```
/home/username/.oh-my-zsh/plugins/debian/debian.plugin.zsh:75: defining function based on alias `abd'
/home/username/.oh-my-zsh/plugins/debian/debian.plugin.zsh:75: parse error near `()'
```

Fixes #7986

Diff

 1diff --git a/plugins/debian/debian.plugin.zsh b/plugins/debian/debian.plugin.zsh
 2index be4062ebff5568a3327f9c752026cf99174a0622..dd80485d03a466d7bc2bc2dd76764aa5c86756c1 100644
 3--- a/plugins/debian/debian.plugin.zsh
 4+++ b/plugins/debian/debian.plugin.zsh
 5@@ -72,7 +72,7 @@ if [[ $use_sudo -eq 1 ]]; then
 6 # commands using su #########
 7 else
 8     alias aac="su -ls '$apt_pref autoclean' root"
 9-    abd() {
10+    function abd() {
11         cmd="su -lc '$apt_pref build-dep $@' root"
12         print "$cmd"
13         eval "$cmd"
14@@ -83,17 +83,17 @@ else
15     alias adu="su -lc '$apt_pref update && aptitude dist-upgrade' root"
16     alias afu="su -lc '$apt-file update'"
17     alias au="su -lc '$apt_pref $apt_upgr' root"
18-    ai() {
19+    function ai() {
20         cmd="su -lc 'aptitude -P install $@' root"
21         print "$cmd"
22         eval "$cmd"
23     }
24-    ap() {
25+    function ap() {
26         cmd="su -lc '$apt_pref -P purge $@' root"
27         print "$cmd"
28         eval "$cmd"
29     }
30-    ar() {
31+    function ar() {
32         cmd="su -lc '$apt_pref -P remove $@' root"
33         print "$cmd"
34         eval "$cmd"