Added these lines to my .bashrc (btw macOS uses .profile instead) and afterwards my shell init took 2+ seconds :
eval "$(/opt/homebrew/bin/rv shell init bash)"
eval "$(/opt/homebrew/bin/rv shell completions bash)"
Found the culprit to be the first line, it's caused by the trap instruction inside:
_rv_autoload_hook() {
eval "$(/opt/homebrew/bin/rv shell env bash)"
}
trap '[[ "$BASH_COMMAND" != "$PROMPT_COMMAND" ]] && _rv_autoload_hook' DEBUG
_rv_autoload_hook
By inlining eval "$(/opt/homebrew/bin/rv shell env bash)" directly in my .bashrc the slowness goes away. I'm not entirely sure what the trap instruction is used for.
Added these lines to my
.bashrc(btw macOS uses.profileinstead) and afterwards my shell init took 2+ seconds :Found the culprit to be the first line, it's caused by the trap instruction inside:
By inlining
eval "$(/opt/homebrew/bin/rv shell env bash)"directly in my.bashrcthe slowness goes away. I'm not entirely sure what the trap instruction is used for.