forked from sorin-ionescu/prezto
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.zsh
More file actions
82 lines (61 loc) · 1.93 KB
/
Copy pathinit.zsh
File metadata and controls
82 lines (61 loc) · 1.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#
# Defines Pacman aliases.
#
# Authors:
# Benjamin Boudreau <dreurmail@gmail.com>
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
# Tips:
# https://wiki.archlinux.org/index.php/Pacman_Tips
#
# Return if requirements are not found.
if (( ! $+commands[pacman] )); then
return 1
fi
#
# Frontend
#
# Get the Pacman frontend.
zstyle -s ':prezto:module:pacman' frontend '_pacman_frontend'
if (( $+commands[$_pacman_frontend] )); then
alias pacman="$_pacman_frontend"
if [[ -s "${0:h}/${_pacman_frontend}.zsh" ]]; then
source "${0:h}/${_pacman_frontend}.zsh"
fi
fi
#
# Aliases
#
# Pacman.
alias pac='pacman'
# Installs packages from repositories.
alias paci='sudo pacman --sync'
# Installs packages from files.
alias pacI='sudo pacman --upgrade'
# Removes packages and unneeded dependencies.
alias pacx='sudo pacman --remove'
# Removes packages, their configuration, and unneeded dependencies.
alias pacX='sudo pacman --remove --nosave --recursive'
# Displays information about a package from the repositories.
alias pacq='pacman --sync --info'
# Displays information about a package from the local database.
alias pacQ='pacman --query --info'
# Searches for packages in the repositories.
alias pacs='pacman --sync --search'
# Searches for packages in the local database.
alias pacS='pacman --query --search'
# Lists orphan packages.
alias pacman-list-orphans='sudo pacman --query --deps --unrequired'
# Removes orphan packages.
alias pacman-remove-orphans='sudo pacman --remove --recursive $(pacman --quiet --query --deps --unrequired)'
# Synchronizes the local package and Arch Build System databases against the
# repositories.
if (( $+commands[abs] )); then
alias pacu='sudo pacman --sync --refresh && sudo abs'
else
alias pacu='sudo pacman --sync --refresh'
fi
# Synchronizes the local package database against the repositories then
# upgrades outdated packages.
alias pacU='sudo pacman --sync --refresh --sysupgrade'
unset _pacman_frontend