1
0
mirror of https://git.decapod.one/brethil/dotfiles synced 2024-11-21 19:11:30 +01:00

zsh: functions: add paclocfile to show information about the package owning a file

This commit is contained in:
bretello 2024-08-12 17:40:19 +02:00
parent f9ed01397c
commit a87ba13157

View File

@ -7,3 +7,13 @@ function pacpreview() {
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}')
}