Skip to content
This repository
Browse code

Merge pull request #1140 from mappleconfusers/pull_req_debian

Enhancements for the Debian Plugin
  • Loading branch information...
commit 48c9e77f53d8949952549060017f6ac84a5a3945 2 parents 91b4758 + 0673425
Robby Russell authored

Showing 1 changed file with 21 additions and 18 deletions. Show diff stats Hide diff stats

  1. +21 18 plugins/debian/debian.plugin.zsh
39 plugins/debian/debian.plugin.zsh
@@ -40,20 +40,23 @@ alias ap='apt-cache policy'
40 40 # superuser operations ######################################################
41 41 if [[ $use_sudo -eq 1 ]]; then
42 42 # commands using sudo #######
43   - alias aac="sudo $apt_pref autoclean"
44   - alias abd="sudo $apt_pref build-dep"
45   - alias ac="sudo $apt_pref clean"
46   - alias ad="sudo $apt_pref update"
47   - alias adg="sudo $apt_pref update && sudo $apt_pref upgrade"
48   - alias adu="sudo $apt_pref update && sudo $apt_pref dist-upgrade"
  43 + alias aac='sudo $apt_pref autoclean'
  44 + alias abd='sudo $apt_pref build-dep'
  45 + alias ac='sudo $apt_pref clean'
  46 + alias ad='sudo $apt_pref update'
  47 + alias adg='sudo $apt_pref update && sudo $apt_pref upgrade'
  48 + alias adu='sudo $apt_pref update && sudo $apt_pref dist-upgrade'
49 49 alias afu='sudo apt-file update'
50   - alias ag="sudo $apt_pref upgrade"
51   - alias ai="sudo $apt_pref install"
52   - alias ap="sudo $apt_pref purge"
53   - alias ar="sudo $apt_pref remove"
  50 + alias ag='sudo $apt_pref upgrade'
  51 + alias ai='sudo $apt_pref install'
  52 + # Install all packages given on the command line while using only the first word of each line:
  53 + # acs ... | ail
  54 + alias ail="sed -e 's/ */ /g' -e 's/ *//' | cut -s -d ' ' -f 1 | "' xargs sudo $apt_pref install'
  55 + alias ap='sudo $apt_pref purge'
  56 + alias ar='sudo $apt_pref remove'
54 57
55 58 # apt-get only
56   - alias ads="sudo $apt_pref dselect-upgrade"
  59 + alias ads='sudo $apt_pref dselect-upgrade'
57 60
58 61 # Install all .deb files in the current directory.
59 62 # Warning: you will need to put the glob in single quotes if you use:
@@ -67,18 +70,18 @@ if [[ $use_sudo -eq 1 ]]; then
67 70
68 71 # commands using su #########
69 72 else
70   - alias aac='su -ls "'"$apt_pref"' autoclean" root'
  73 + alias aac='su -ls \'$apt_pref autoclean\' root'
71 74 abd() {
72 75 cmd="su -lc '$apt_pref build-dep $@' root"
73 76 print "$cmd"
74 77 eval "$cmd"
75 78 }
76   - alias ac='su -ls "'"$apt_pref"' clean" root'
77   - alias ad='su -lc "'"$apt_pref"' update" root'
78   - alias adg='su -lc "'"$apt_pref"' update && aptitude safe-upgrade" root'
79   - alias adu='su -lc "'"$apt_pref"' update && aptitude dist-upgrade" root'
  79 + alias ac='su -ls \'$apt_pref clean\' root'
  80 + alias ad='su -lc \'$apt_pref update\' root'
  81 + alias adg='su -lc \'$apt_pref update && aptitude safe-upgrade\' root'
  82 + alias adu='su -lc \'$apt_pref update && aptitude dist-upgrade\' root'
80 83 alias afu='su -lc "apt-file update"'
81   - alias ag='su -lc "'"$apt_pref"' safe-upgrade" root'
  84 + alias ag='su -lc \'$apt_pref safe-upgrade\' root'
82 85 ai() {
83 86 cmd="su -lc 'aptitude -P install $@' root"
84 87 print "$cmd"
@@ -118,7 +121,7 @@ alias mydeb='time dpkg-buildpackage -rfakeroot -us -uc'
118 121 apt-copy() {
119 122 print '#!/bin/sh'"\n" > apt-copy.sh
120 123
121   - cmd="$apt_pref install "
  124 + cmd='$apt_pref install'
122 125
123 126 for p in ${(f)"$(aptitude search -F "%p" --disable-columns \~i)"}; {
124 127 cmd="${cmd} ${p}"

0 comments on commit 48c9e77

Please sign in to comment.
Something went wrong with that request. Please try again.