Add some more distrobox stuff
This commit is contained in:
parent
f21f778bd5
commit
4a3a91dd9c
22
init.zsh
22
init.zsh
@ -32,6 +32,22 @@ function source_user_file {
|
|||||||
# Load user early init file
|
# Load user early init file
|
||||||
source_user_file "early-init"
|
source_user_file "early-init"
|
||||||
|
|
||||||
|
# Load distrobox early init file
|
||||||
|
if [[ -v DISTROBOX_ENTER_PATH ]] && [[ -e /run/.containerenv ]]; then
|
||||||
|
local ctenv=("${(@f)"$(</run/.containerenv)"}")
|
||||||
|
for line in ${ctenv}; do
|
||||||
|
if [[ "${line}" == 'name='* ]]; then
|
||||||
|
export DISTROBOX_MY_NAME="${(Q)${line:5}}"
|
||||||
|
if [[ -d "${HOME}/src/compat/${DISTROBOX_MY_NAME}" ]]; then
|
||||||
|
export DISTROBOX_MY_COMPAT="${HOME}/src/compat/${DISTROBOX_MY_NAME}"
|
||||||
|
local init_file="${DISTROBOX_MY_COMPAT}/early-init.zsh"
|
||||||
|
[[ -e "${init_file}" ]] && source "${init_file}"
|
||||||
|
fi
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
# Some options
|
# Some options
|
||||||
setopt autocd extendedglob rm_star_silent completealiases rc_quotes histignorespace
|
setopt autocd extendedglob rm_star_silent completealiases rc_quotes histignorespace
|
||||||
unsetopt beep notify
|
unsetopt beep notify
|
||||||
@ -297,6 +313,12 @@ bindkey '^ ' autosuggest-accept
|
|||||||
# Load user init file
|
# Load user init file
|
||||||
source_user_file 'local'
|
source_user_file 'local'
|
||||||
|
|
||||||
|
# Load distrobox normal init file
|
||||||
|
if [[ -v DISTROBOX_MY_COMPAT ]] && \
|
||||||
|
[[ -f "${DISTROBOX_MY_COMPAT}/init.zsh" ]]; then
|
||||||
|
source "${DISTROBOX_MY_COMPAT}/init.zsh"
|
||||||
|
fi
|
||||||
|
|
||||||
# THE FOLLOWING PLUGINS MUST COME LAST
|
# THE FOLLOWING PLUGINS MUST COME LAST
|
||||||
|
|
||||||
# More completions
|
# More completions
|
||||||
|
Loading…
x
Reference in New Issue
Block a user