mirror of
https://git.decapod.one/brethil/dotfiles
synced 2024-11-25 04:51:31 +01:00
zsh: functions: add paclocfile to show information about the package owning a file
This commit is contained in:
parent
f9ed01397c
commit
a87ba13157
|
@ -7,3 +7,13 @@ function pacpreview() {
|
||||||
fi
|
fi
|
||||||
pacman -Slq | fzf --multi --preview 'grc --colour=on pacman -Si {1}' | xargs -ro sudo pacman -S
|
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}')
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user