]> git.rmz.io Git - dotfiles.git/commitdiff
zsh: add apt aliases
authorSamir Benmendil <me@rmz.io>
Thu, 7 Apr 2016 10:34:22 +0000 (11:34 +0100)
committerSamir Benmendil <me@rmz.io>
Thu, 7 Apr 2016 10:34:22 +0000 (11:34 +0100)
zsh/aliases/apt.zsh [new file with mode: 0644]
zsh/aliases/pacman.zsh

diff --git a/zsh/aliases/apt.zsh b/zsh/aliases/apt.zsh
new file mode 100644 (file)
index 0000000..147dfc8
--- /dev/null
@@ -0,0 +1,18 @@
+if (( ! $+commands[apt-get] )); then
+    return 1
+fi
+
+alias pacupg='sudo apt-get update && sudo apt-get install'
+alias pacin='sudo apt-get install'               # Install specific package(s) from the repositories
+alias pacu='sudo dpkg -i'                        # Install specific package not from the repositories but from a file
+alias pacre='sudo apt-get remove'                # Remove the specified package(s), retaining its configuration(s) and required dependencies
+alias pacrem='sudo apt-get remove --auto-remove' # Remove the specified package(s), its configuration(s) and unneeded dependencies
+alias pacrm='sudo apt-get remove --auto-remove'  # Remove the specified package(s), its configuration(s) and unneeded dependencies
+alias pacsi='apt-cache show'                     # Display information about a given package in the repositories
+alias pacss='apt-cache search'                   # Search for package(s) in the repositories
+alias pacqi='dpkg --status'                      # Display information about a given package in the local database
+alias pacqs='dpkg --list'                        # Search for package(s) in the local database
+alias pacl='dpkg --listfiles'                    # List all files owned by package(s)
+alias paco='dpkg --search'                       # List package owning the given file(s)
+alias pacdep='sudo apt-mark auto'           # Mark package as dependency
+alias pacexp='sudo apt-mark manual'       # Mark package as explicit
index 988902d96e06a922e74c1c45d6aca2dd00d43677..d44641b802718bb25feb3c8e122b68f2baeec6ab 100644 (file)
@@ -1,9 +1,13 @@
+if (( ! $+commands[pacman] )); then
+    return 1
+fi
+
 # Pacman - https://wiki.archlinux.org/index.php/Pacman_Tips
 alias pacupg='sudo pacman -Syu'        # Synchronize with repositories before upgrading packages that are out of date on the local system.
 alias pacin='sudo pacman -S'           # Install specific package(s) from the repositories
 alias pacu='sudo pacman -U'            # Install specific package not from the repositories but from a file
 alias pacre='sudo pacman -R'           # Remove the specified package(s), retaining its configuration(s) and required dependencies
-alias pacrem='sudo pacman -Rns'        # Remove the specified package(s), its configuration(s) and unneeded dependencies
+alias pacrem='sudo pacman -Rns'        # Remove the specified package(s) and unneeded dependencies
 alias pacrm='sudo pacman -Rnsc'        # Remove the specified package(s), its configuration(s) and unneeded dependencies
 alias pacsi='pacman -Sii'              # Display information about a given package in the repositories
 alias pacss='pacman -Ss'               # Search for package(s) in the repositories