General housekeeping tasks
This commit is contained in:
parent
d1fe086f7c
commit
9f1181ae02
6 changed files with 114 additions and 46 deletions
|
@ -2,8 +2,15 @@ if [[ -n "$(which-command direnv)" ]]; then
|
|||
function _env() {
|
||||
if [[ -z "$_DIRENV_ShowEnvLogic" ]]; then
|
||||
echo "_DIRENV_ShowEnvLogic is not defined."
|
||||
else
|
||||
eval "$_DIRENV_ShowEnvLogic" | LC_ALL=C sort -h
|
||||
if [[ $# -gt 0 ]]; then
|
||||
local _DIRENV_ShowEnvLogic='printenv'
|
||||
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"
|
||||
fi
|
||||
}
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue