mirror of
https://git.decapod.one/brethil/dotfiles
synced 2024-11-24 20:41:31 +01:00
20 lines
568 B
Bash
20 lines
568 B
Bash
if ! command -v pacman &>/dev/null; then return; fi
|
|
|
|
function pacpreview() {
|
|
if ! command -v fzf &>/dev/null; then
|
|
echo "Requires fzf! Quitting"
|
|
return 1
|
|
fi
|
|
pacman -Slq | fzf --multi --preview 'grc --colour=on pacman -Si {1}' | xargs -ro sudo pacman -S
|
|
}
|
|
|
|
|
|
function paclocfile() {
|
|
if [[ -z $1 ]]; then
|
|
echo "Usage: paclocfile /path/to/file" >&2
|
|
echo "Shows information about the package owning the given file" >&2
|
|
return 1
|
|
fi
|
|
pacman -Qi $(pacman -Qo /etc/containers/registries.conf | awk '{print $5}')
|
|
}
|