diff --git a/functions/pacman.zsh b/functions/pacman.zsh index bd7c116..2f54ea9 100644 --- a/functions/pacman.zsh +++ b/functions/pacman.zsh @@ -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}') +}