2022-07-11 21:59:11 +00:00
|
|
|
if [[ -n "$(which-command direnv)" ]]; then
|
|
|
|
function _env() {
|
|
|
|
if [[ -z "$_DIRENV_ShowEnvLogic" ]]; then
|
|
|
|
echo "_DIRENV_ShowEnvLogic is not defined."
|
2022-07-25 15:21:39 +00:00
|
|
|
if [[ $# -gt 0 ]]; then
|
2022-08-02 11:27:25 +00:00
|
|
|
local _DIRENV_ShowEnvLogic='set'
|
2022-07-25 15:21:39 +00:00
|
|
|
printf "Searching environment for: '${@}'\n\n"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
if [[ -n "$_DIRENV_ShowEnvLogic" ]]; then
|
|
|
|
FILTER=''
|
|
|
|
[[ $# -gt 0 ]] && FILTER="| grep ${@}"
|
|
|
|
eval "$_DIRENV_ShowEnvLogic | LC_ALL=C sort -h $FILTER"
|
2022-07-11 21:59:11 +00:00
|
|
|
fi
|
|
|
|
}
|
2022-08-11 13:18:21 +00:00
|
|
|
|
|
|
|
alias direnv-allow="direnv allow "
|
2022-07-11 21:59:11 +00:00
|
|
|
fi
|