65f16fb64b77754386f34d207e073ee457afb0e7

Author
Marc Cornellà <marc.cornella@live.com>
Committer
Marc Cornellà <marc.cornella@live.com>
Date

Message

archlinux: remove comments, format functions better

Diff

This diff is truncated to protect this page.

  1diff --git a/plugins/archlinux/archlinux.plugin.zsh b/plugins/archlinux/archlinux.plugin.zsh
  2index f6844328570cb1c5e69f057057f45ebb0b683b05..ef862f14c8b9082095da5e0590c481e53dc23144 100644
  3--- a/plugins/archlinux/archlinux.plugin.zsh
  4+++ b/plugins/archlinux/archlinux.plugin.zsh
  5@@ -1,74 +1,72 @@
  6-# Archlinux zsh aliases and functions
  7-# Usage is also described at https://github.com/robbyrussell/oh-my-zsh/wiki/Plugins
  8-
  9-# Look for yaourt, and add some useful functions if we have it.
 10-if (( $+commands[yaourt] )); then
 11+if ! (( $+commands[yaourt] )); then
 12+  upgrade() {
 13+    sudo pacman -Syu
 14+  }
 15+else
 16   upgrade () {
 17     yaourt -Syu
 18   }
 19-  alias yaconf='yaourt -C'        # Fix all configuration files with vimdiff
 20-  # Pacman - https://wiki.archlinux.org/index.php/Pacman_Tips
 21-  alias yaupg='yaourt -Syua'        # Synchronize with repositories before upgrading packages (AUR packages too) that are out of date on the local system.
 22-  alias yasu='yaourt --Syua --no-confirm' # Same as yaupg, but without confirmation
 23-  alias yain='yaourt -S'           # Install specific package(s) from the repositories
 24-  alias yains='yaourt -U'          # Install specific package not from the repositories but from a file
 25-  alias yare='yaourt -R'           # Remove the specified package(s), retaining its configuration(s) and required dependencies
 26-  alias yarem='yaourt -Rns'        # Remove the specified package(s), its configuration(s) and unneeded dependencies
 27-  alias yarep='yaourt -Si'         # Display information about a given package in the repositories
 28-  alias yareps='yaourt -Ss'        # Search for package(s) in the repositories
 29-  alias yaloc='yaourt -Qi'         # Display information about a given package in the local database
 30-  alias yalocs='yaourt -Qs'        # Search for package(s) in the local database
 31-  alias yalst='yaourt -Qe'         # List installed packages, even those installed from AUR (they're tagged as "local")
 32-  alias yaorph='yaourt -Qtd'       # Remove orphans using yaourt
 33-  # Additional yaourt alias examples
 34+
 35+  alias yaconf='yaourt -C'
 36+  alias yaupg='yaourt -Syua'
 37+  alias yasu='yaourt --Syua --no-confirm'
 38+  alias yain='yaourt -S'
 39+  alias yains='yaourt -U'
 40+  alias yare='yaourt -R'
 41+  alias yarem='yaourt -Rns'
 42+  alias yarep='yaourt -Si'
 43+  alias yareps='yaourt -Ss'
 44+  alias yaloc='yaourt -Qi'
 45+  alias yalocs='yaourt -Qs'
 46+  alias yalst='yaourt -Qe'
 47+  alias yaorph='yaourt -Qtd'
 48+  alias yainsd='yaourt -S --asdeps'
 49+  alias yamir='yaourt -Syy'
 50+
 51+
 52   if (( $+commands[abs] && $+commands[aur] )); then
 53-    alias yaupd='yaourt -Sy && sudo abs && sudo aur'  # Update and refresh the local package, ABS and AUR databases against repositories
 54+    alias yaupd='yaourt -Sy && sudo abs && sudo aur'
 55   elif (( $+commands[abs] )); then
 56-    alias yaupd='yaourt -Sy && sudo abs'   # Update and refresh the local package and ABS databases against repositories
 57+    alias yaupd='yaourt -Sy && sudo abs'
 58   elif (( $+commands[aur] )); then
 59-    alias yaupd='yaourt -Sy && sudo aur'   # Update and refresh the local package and AUR databases against repositories
 60+    alias yaupd='yaourt -Sy && sudo aur'
 61   else
 62-    alias yaupd='yaourt -Sy'               # Update and refresh the local package database against repositories
 63+    alias yaupd='yaourt -Sy'
 64   fi
 65-  alias yainsd='yaourt -S --asdeps'        # Install given package(s) as dependencies of another package
 66-  alias yamir='yaourt -Syy'                # Force refresh of all package lists after updating /etc/pacman.d/mirrorlist
 67-else
 68- upgrade() {
 69-   sudo pacman -Syu
 70- }
 71 fi
 72 
 73 # Pacman - https://wiki.archlinux.org/index.php/Pacman_Tips
 74-alias pacupg='sudo pacman -Syu'        # Synchronize with repositories before upgrading packages that are out of date on the local system.
 75-alias pacin='sudo pacman -S'           # Install specific package(s) from the repositories
 76-alias pacins='sudo pacman -U'          # Install specific package not from the repositories but from a file
 77-alias pacre='sudo pacman -R'           # Remove the specified package(s), retaining its configuration(s) and required dependencies
 78-alias pacrem='sudo pacman -Rns'        # Remove the specified package(s), its configuration(s) and unneeded dependencies
 79-alias pacrep='pacman -Si'              # Display information about a given package in the repositories
 80-alias pacreps='pacman -Ss'             # Search for package(s) in the repositories
 81-alias pacloc='pacman -Qi'              # Display information about a given package in the local database
 82-alias paclocs='pacman -Qs'             # Search for package(s) in the local database
 83-# Additional pacman alias examples
 84+alias pacupg='sudo pacman -Syu'
 85+alias pacin='sudo pacman -S'
 86+alias pacins='sudo pacman -U'
 87+alias pacre='sudo pacman -R'
 88+alias pacrem='sudo pacman -Rns'
 89+alias pacrep='pacman -Si'
 90+alias pacreps='pacman -Ss'
 91+alias pacloc='pacman -Qi'
 92+alias paclocs='pacman -Qs'
 93+alias pacinsd='sudo pacman -S --asdeps'
 94+alias pacmir='sudo pacman -Syy'
 95+alias paclsorphans='sudo pacman -Qdt'
 96+alias pacrmorphans='sudo pacman -Rs $(pacman -Qtdq)'
 97+
 98+
 99 if (( $+commands[abs] && $+commands[aur] )); then
100-  alias pacupd='sudo pacman -Sy && sudo abs && sudo aur'  # Update and refresh the local package, ABS and AUR databases against repositories
101+  alias pacupd='sudo pacman -Sy && sudo abs && sudo aur'
102 elif (( $+commands[abs] )); then
103-  alias pacupd='sudo pacman -Sy && sudo abs'              # Update and refresh the local package and ABS databases against repositories
104+  alias pacupd='sudo pacman -Sy && sudo abs'