What kinds of commands can run with exec? For example, executable files, builtin commands, shell script, compound commands (e.g. looping, conditional branching),  pipeline, command list, commands grouped by parentheses or braces, ...?Because the parent shell exits upon the command run with exec finishes running, it is hard to tell if there is an error.
What kinds of commands can run with exec?
bash;shell;exec
exec replaces the current shell executable by another executable, i.e. an external command, in the same process. Since there is no shell to execute anything, shell concepts such as aliases, functions, builtins, or compound commands cannot be invoked via exec. (The syntax doesn't allow compound commands anyway.)The shell does not exit when the command run with exec finishes running. The shell program terminates when it runs exec, in the sense that its code stops running (but, once again, the process does not exit). The shell process keeps running the new program. When the executed program terminates, the parent of the process is notified as usual; it is up to it to react to any error.