zsh autoenv refactor
This commit is contained in:
parent
3755822796
commit
f410467a9a
@ -13,7 +13,7 @@ _autoenv_hash_pair() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
local env_cksum=${${:-$(cksum "${env_file}")}[1]}
|
local env_cksum=${${:-$(cksum "${env_file}")}[1]}
|
||||||
echo "${env_file}:${env_cksum}"
|
printf "%s:%s" "${env_file}" "${env_cksum}"
|
||||||
}
|
}
|
||||||
|
|
||||||
_autoenv_envfile_authorize() {
|
_autoenv_envfile_authorize() {
|
||||||
@ -71,10 +71,12 @@ fi
|
|||||||
autoenv-auth() {
|
autoenv-auth() {
|
||||||
if [ -s "${PWD}/${AUTOENV_FILE_ENTER}" ]; then
|
if [ -s "${PWD}/${AUTOENV_FILE_ENTER}" ]; then
|
||||||
_autoenv_hash_pair "${PWD}/${AUTOENV_FILE_ENTER}" >> "${AUTOENV_AUTH_FILE}"
|
_autoenv_hash_pair "${PWD}/${AUTOENV_FILE_ENTER}" >> "${AUTOENV_AUTH_FILE}"
|
||||||
|
echo "\n" >> "${AUTOENV_AUTH_FILE}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -s "${PWD}/${AUTOENV_FILE_LEAVE}" ]; then
|
if [ -s "${PWD}/${AUTOENV_FILE_LEAVE}" ]; then
|
||||||
_autoenv_hash_pair "${PWD}/${AUTOENV_FILE_LEAVE}" >> "${AUTOENV_AUTH_FILE}"
|
_autoenv_hash_pair "${PWD}/${AUTOENV_FILE_LEAVE}" >> "${AUTOENV_AUTH_FILE}"
|
||||||
|
echo "\n" >> "${AUTOENV_AUTH_FILE}"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user