Replace 'if (command -v x &>/dev/null); then' with 'if command -v x &>/dev/null; then' across completion.d, rc.d and profile.d. Parentheses forced a subshell fork for every 'if' check, which is unnecessary overhead since command -v runs fine in the current shell. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
15 lines
301 B
Plaintext
15 lines
301 B
Plaintext
if asdf which direnv &>/dev/null; then
|
|
# Hook direnv into your shell.
|
|
eval "$(asdf exec direnv hook bash)"
|
|
|
|
# A shortcut for asdf managed direnv.
|
|
direnv() { asdf exec direnv "$@"; }
|
|
|
|
return
|
|
|
|
elif command -v direnv &>/dev/null; then
|
|
# Hook direnv into your shell.
|
|
eval "$(direnv hook bash)"
|
|
|
|
fi
|