diff options
author | Marc Cornellà <marc.cornella@live.com> | 2019-09-08 14:58:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-08 14:58:46 +0200 |
commit | a870fee6a7cb6783e85abe42a222c7d5f4e89676 (patch) | |
tree | c576950a97999d0f1ea9c455d35bacd3d0b98cae | |
parent | b3d3ce8aa604aecc52c132a9d67e075b0ca64722 (diff) | |
download | zsh-a870fee6a7cb6783e85abe42a222c7d5f4e89676.tar.gz zsh-a870fee6a7cb6783e85abe42a222c7d5f4e89676.tar.bz2 zsh-a870fee6a7cb6783e85abe42a222c7d5f4e89676.zip |
Update syntax on the remaining functions
-rw-r--r-- | plugins/debian/debian.plugin.zsh | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/plugins/debian/debian.plugin.zsh b/plugins/debian/debian.plugin.zsh index dd80485d0..68c6df1ae 100644 --- a/plugins/debian/debian.plugin.zsh +++ b/plugins/debian/debian.plugin.zsh @@ -114,7 +114,7 @@ fi # Registers a compdef for $1 that calls $apt_pref with the commands $2 # To do that it creates a new completion function called _apt_pref_$2 # -apt_pref_compdef() { +function apt_pref_compdef() { local f fb f="_apt_pref_${2}" @@ -151,7 +151,7 @@ alias mydeb='time dpkg-buildpackage -rfakeroot -us -uc' # Functions ################################################################# # create a simple script that can be used to 'duplicate' a system -apt-copy() { +function apt-copy() { print '#!/bin/sh'"\n" > apt-copy.sh cmd='$apt_pref install' @@ -173,7 +173,7 @@ apt-copy() { # apt-history rollback # apt-history list # Based On: https://linuxcommando.blogspot.com/2008/08/how-to-show-apt-log-history.html -apt-history () { +function apt-history() { case "$1" in install) zgrep --no-filename 'install ' $(ls -rt /var/log/dpkg*) @@ -202,7 +202,7 @@ apt-history () { } # Kernel-package building shortcut -kerndeb () { +function kerndeb() { # temporarily unset MAKEFLAGS ( '-j3' will fail ) MAKEFLAGS=$( print - $MAKEFLAGS | perl -pe 's/-j\s*[\d]+//g' ) print '$MAKEFLAGS set to '"'$MAKEFLAGS'" @@ -216,10 +216,9 @@ kerndeb () { } # List packages by size -function apt-list-packages { +function apt-list-packages() { dpkg-query -W --showformat='${Installed-Size} ${Package} ${Status}\n' | \ grep -v deinstall | \ sort -n | \ awk '{print $1" "$2}' } - |