alias pacinsd='sudo pacman -S --asdeps' # Install given package(s) as dependencies of another package
alias pacmir='sudo pacman -Syy' # Force refresh of all package lists after updating /etc/pacman.d/mirrorlist
+[[ -x /usr/bin/packer ]] && alias aur='packer'
+
# https://bbs.archlinux.org/viewtopic.php?id=93683
paclist() {
pacman -Qei | awk 'BEGIN {FS=": "}/^Name/{printf("\033[1;36m%s\033[0m ",$2)}/^Description/{print $2}'
# Display information about given packages (merges output of -Sii and -Qii)
paci() {
for p in $@; do
- if [[ -n "$(pacman -Qq "$p" 2>/dev/null)" ]]; then
+ if [[ -n "$(pacman -Qq "$p" 2>/dev/null)" ]]; then
diff -u100 <(pacman -Qii "$p") <(pacman -Sii "$p" | sed '/^$/,$ d') | sed -e '1,3 d' -e 's/[-+ ]//'
else
pacman -Sii "$p"
fi
done
}
+# will only work after another pacman completion has been called first
+compdef '_pacman_completions_all_packages' paci=pacman
+
+pacstat() {
+ LC_ALL=C pacman -Sl | sed -n '/\[installed\]/s/^\([^ ]*\).*/\1/p' | uniq -c
+}
pacdisowned() {
tmp=${TMPDIR-/tmp}/pacman-disowned-$UID-$$
pacman -Qlq | sort -u > "$db"
- find /bin /etc /lib /sbin /usr \
- ! -name lost+found \
+ local -a d
+ if [[ -z $@ ]]; then
+ d=(/etc /usr)
+ else
+ d=($@)
+ fi
+ find ${d[@]} \
+ ! \( -name lost+found \
+ -o -path '*/local/*' \
+ -o -path "*/share/mime/*" \
+ \) \
\( -type d -printf '%p/\n' -o -print \) | sort > "$fs"
comm -23 "$fs" "$db"