pkg/query

This commit is contained in:
Marc Beninca 2024-09-07 10:41:11 +02:00
parent a2d668f740
commit 1a5dcbf4d1
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

View file

@ -870,17 +870,6 @@ spcd_python_pip() {
fi
}
spcd_query_package() {
case "${SPCD_PM}" in
"${SPCD_PM_APK}") apk info "${1}" ;;
"${SPCD_PM_APT}") dpkg-query --show "${1}" ;;
"${SPCD_PM_DNF}") rpm --query "${1}" ;;
"${SPCD_PM_PACMAN}") pacman --query "${1}" ;;
"${SPCD_PM_ZYPPER}") rpm --query "${1}" ;;
*) ;;
esac
}
spcd_txt_locale() {
local action="${1}"
local chosen="${2}"
@ -1038,6 +1027,17 @@ ${name}.${_SPCD_TXT_CHARSET} ${_SPCD_TXT_CHARSET}
# │ e │ packages │
# ╰───┴──────────╯
spcd_query_package() {
case "${SPCD_PM}" in
"${SPCD_PM_APK}") apk info "${1}" ;;
"${SPCD_PM_APT}") dpkg-query --show "${1}" ;;
"${SPCD_PM_DNF}") rpm --query "${1}" ;;
"${SPCD_PM_PACMAN}") pacman --query "${1}" ;;
"${SPCD_PM_ZYPPER}") rpm --query "${1}" ;;
*) ;;
esac
}
# ╭───┬─────╮
# │ s │ dns │
# ╰───┴─────╯