I have my
.bash_profile being loaded at shell start; except for some
alias, there's a command that needs a couple of seconds to run:
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
And I need to wait this 2 seconds delay all the times I open a new terminal.
Given that I almost never use NVM and that I don't need it to be ready immediately after shell loading,
- how can I delay the execution of that command? (e.g. running 10 seconds after the shell is loaded)
- how can I set the execution of such command to be asynchronous so that it doesn't block the fast loading and readiness of my shell?