Nice try, Egon, but I think your solution has the same drawbacks as the idea I mentioned in comment #2. The parentheses would make the ~/.profile commands be run in a subprocess, so if no error, you would need to source ~/.profile in the main process as well, or else settings of e.g. environment variables via ~/.profile would not work. In other words, normally ~/.profile would be sourced twice.
Nice try, Egon, but I think your solution has the same drawbacks as the idea I mentioned in comment #2. The parentheses would make the ~/.profile commands be run in a subprocess, so if no error, you would need to source ~/.profile in the main process as well, or else settings of e.g. environment variables via ~/.profile would not work. In other words, normally ~/.profile would be sourced twice.