+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
# 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"
pacman -Qlq | sort -u > "$db"
- find /bin /etc /lib /sbin /usr \
- ! \( -name lost+found -o -name local -o -path "*/share/mime/*" \) \
+ 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"