Zsh: Change Gentoo repo directory aliases a bit

- Check for /etc/gentoo-release instead of calling lsb_release
- Make allrepos command nicer
This commit is contained in:
tastytea 2022-04-08 00:28:05 +02:00
parent 12256f9137
commit 10e4b0ff86
Signed by: tastytea
SSH Key Fingerprint: SHA256:FBkvrOlhq5use1XEttyUGT4bUTDVA1ar9SgIc9P03cM

View File

@ -85,8 +85,7 @@ alias machklein='mksmol'
alias diff='diff --color=auto' alias diff='diff --color=auto'
# OS specific settings. # OS specific settings.
case $(lsb_release -i -s 2> /dev/null) in if [[ -f /etc/gentoo-release ]]; then
Gentoo)
# Directory aliases for some Gentoo paths # Directory aliases for some Gentoo paths
for dir in /etc/portage/package.*; do for dir in /etc/portage/package.*; do
hash -d -- -${dir##*/}=${dir} hash -d -- -${dir##*/}=${dir}
@ -118,9 +117,8 @@ case $(lsb_release -i -s 2> /dev/null) in
} }
async_start_worker diralias_repo async_start_worker diralias_repo
async_register_callback diralias_repo _my_diralias_repo_done async_register_callback diralias_repo _my_diralias_repo_done
async_job diralias_repo "print -n "allrepos=" && portageq get_repos /" async_job diralias_repo 'print -n "allrepos=$(portageq get_repos /)"'
;; fi
esac
command -v apt-cache > /dev/null && alias qs="apt-cache search --names-only" command -v apt-cache > /dev/null && alias qs="apt-cache search --names-only"