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:
parent
12256f9137
commit
10e4b0ff86
|
@ -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"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user