Skip to content
This repository

Enhancements for the Debian Plugin #1140

Merged
merged 2 commits into from almost 2 years ago

3 participants

Karolin Varner Pavel Puchkin Robby Russell
Karolin Varner
koraa commented May 29, 2012

· Evaluate the apt-get/aptitude on alias expansion
· Add command to install the output of acs directly

Robby Russell robbyrussell merged commit 48c9e77 into from May 31, 2012
Robby Russell robbyrussell closed this May 31, 2012
Pavel Puchkin

1876f1d breaks completion for me

Karolin Varner
koraa commented June 29, 2012

Confirmed...
Im on it

Karolin Varner
koraa commented June 29, 2012

Fixed it: #1201

Pavel Puchkin

@mappleconfusers great, thx

Michele Campeotto micampe referenced this pull request from a commit August 04, 2012
Commit has since been removed from the repository and is no longer available.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 2 unique commits by 1 author.

May 29, 2012
Make the $apt_pref variable evaluatet at alias expansion by using sin…
…gle-quotes instad of double quotes
1876f1d
Add command to directly install the output of acs 0673425
This page is out of date. Refresh to see the latest.

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

  1. 39  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}"
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.