-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbashrc-arch
42 lines (33 loc) · 1.05 KB
/
bashrc-arch
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
#
# Shell configuration specific to Arch Linux
#
# Show package build script
function pkg () {
asp show $1 | c
}
# Show binaries installed by a package
function plbin () {
pacman -Ql $1 | ag -sw bin
}
# List installed packages for which a given package is an optional dependency
function poptionalof() {
[ $# -eq 0 ] && echo "Specify a package that might be an optional dependency of one or more installed packages" && return 1
echo "Looking for installed packages which list $1 as their optional dependency... (this might take a while)"
echo
comm -12 <(pacman -Qq --color never | sort) <(for pkg in $(pacman -Qq); do
if pacman -Qi "$pkg" | grep -q "Optional Deps.*$1"; then
echo "$pkg"
fi
done | sort)
}
# Directly boot kernel image
function kboot() {
[ $# -eq 0 ] && echo "Specify a kernel image to boot" && return 1
sudo kexec -l "$1" --reuse-cmdline && systemctl kexec
}
alias pi="yay -Sii"
alias pl="yay -Ql"
alias po="yay -Qo"
alias pfiles="pkgfile -l"
alias yup="yay -Syu"
alias regrub="sudo grub-mkconfig -o /boot/grub/grub.cfg"