]>
git.rmz.io Git - dotfiles.git/blob - zsh/plugins/archlinux/archlinux.plugin.zsh
ae92a0b4c5913ee7b7074f48b9cb283b5c437992
1 # Archlinux zsh aliases and functions
2 # Usage is also described at https://github.com/robbyrussell/oh-my-zsh/wiki/Plugins
4 # Look for yaourt, and add some useful functions if we have it.
5 if [[ -x `which yaourt` ]]; then
9 alias yaconf
='yaourt -C' # Fix all configuration files with vimdiff
10 # Pacman - https://wiki.archlinux.org/index.php/Pacman_Tips
11 alias yaupg
='yaourt -Syu' # Synchronize with repositories before upgrading packages that are out of date on the local system.
12 alias yasu
='yaourt --sucre' # Same as yaupg, but without confirmation
13 alias yain
='yaourt -S' # Install specific package(s) from the repositories
14 alias yains
='yaourt -U' # Install specific package not from the repositories but from a file
15 alias yare
='yaourt -R' # Remove the specified package(s), retaining its configuration(s) and required dependencies
16 alias yarem
='yaourt -Rns' # Remove the specified package(s), its configuration(s) and unneeded dependencies
17 alias yarep
='yaourt -Si' # Display information about a given package in the repositories
18 alias yareps
='yaourt -Ss' # Search for package(s) in the repositories
19 alias yaloc
='yaourt -Qi' # Display information about a given package in the local database
20 alias yalocs
='yaourt -Qs' # Search for package(s) in the local database
21 # Additional yaourt alias examples
22 if [[ -x `which abs` ]]; then
23 alias yaupd
='yaourt -Sy && sudo abs' # Update and refresh the local package and ABS databases against repositories
25 alias yaupd
='yaourt -Sy' # Update and refresh the local package and ABS databases against repositories
27 alias yainsd
='yaourt -S --asdeps' # Install given package(s) as dependencies of another package
28 alias yamir
='yaourt -Syy' # Force refresh of all package lists after updating /etc/pacman.d/mirrorlist
35 # Pacman - https://wiki.archlinux.org/index.php/Pacman_Tips
36 alias pacupg
='sudo pacman -Syu' # Synchronize with repositories before upgrading packages that are out of date on the local system.
37 alias pacin
='sudo pacman -S' # Install specific package(s) from the repositories
38 alias pacins
='sudo pacman -U' # Install specific package not from the repositories but from a file
39 alias pacre
='sudo pacman -R' # Remove the specified package(s), retaining its configuration(s) and required dependencies
40 alias pacrem
='sudo pacman -Rns' # Remove the specified package(s), its configuration(s) and unneeded dependencies
41 alias pacrep
='pacman -Si' # Display information about a given package in the repositories
42 alias pacreps
='pacman -Ss' # Search for package(s) in the repositories
43 alias pacloc
='pacman -Qi' # Display information about a given package in the local database
44 alias paclocs
='pacman -Qs' # Search for package(s) in the local database
45 # Additional pacman alias examples
46 if [[ -x `which abs` ]]; then
47 alias pacupd
='sudo pacman -Sy && sudo abs' # Update and refresh the local package and ABS databases against repositories
49 alias pacupd
='sudo pacman -Sy' # Update and refresh the local package and ABS databases against repositories
51 alias pacinsd
='sudo pacman -S --asdeps' # Install given package(s) as dependencies of another package
52 alias pacmir
='sudo pacman -Syy' # Force refresh of all package lists after updating /etc/pacman.d/mirrorlist
54 # https://bbs.archlinux.org/viewtopic.php?id=93683
56 sudo pacman
-Qei $(pacman -Qu|cut -d" " -f 1)|awk ' BEGIN {FS=":"}/^Name/{printf("\033[1;36m%s\033[1;37m", $2)}/^Description/{print $2}'
59 alias paclsorphans
='sudo pacman -Qdt'
60 alias pacrmorphans
='sudo pacman -Rs $(pacman -Qtdq)'
63 tmp
=${TMPDIR-/tmp}/pacman
-disowned-$UID-$$
68 trap 'rm -rf "$tmp"' EXIT
70 pacman
-Qlq | sort -u > "$db"
72 find /bin
/etc
/lib
/sbin
/usr \
74 \
( -type d
-printf '%p/\n' -o -print \
) | sort > "$fs"
80 # Get all keys for developers and trusted users
81 curl https
://www.archlinux.org
/{developers
,trustedusers
}/ |
82 awk -F\" '(/pgp.mit.edu/) {sub(/.*search=0x/,"");print $1}' |
83 xargs sudo pacman
-key --recv-keys
88 sudo pacman
-key --recv-keys $key
89 sudo pacman
-key --lsign-key $key
90 printf 'trust\n3\n' | sudo gpg
--homedir /etc
/pacman.d
/gnupg \
91 --no-permission-warning --command-fd 0 --edit-key $key