Update xbps-aliases, call hash -r after (un)install actions

This commit is contained in:
crater2150 2020-02-24 10:38:51 +01:00
parent 6292d72015
commit 4952a2cd74

View file

@ -1,5 +1,19 @@
#!/bin/zsh
hashafter () {
local fname=$1
eval "
function $fname() {
command $fname \"\$@\"
hash -r
}
"
}
hashafter xi
hashafter xbps-install
hashafter xbps-remove
grep -q "void" /etc/os-release || return
alias xq="xbps-query -Rs"
@ -16,19 +30,19 @@ xqn() {
alias xfiles="xbps-query -f"
function xupdate() {
xupdate() {
sudo xbps-install -Su
if [[ $? == 16 ]]; then
xbps-install -Syu xbps
sudo xbps-install -Syu xbps
xupdate
fi
}
function xowner() {
xowner() {
xbps-query -Ro "*${1}*"
}
sv() {
command sv "$@"
if [[ "$1" == "up" ]]; then