sh-end-of-command

sh-end-of-command is a variable defined in `sh-script.el'.
Its value is
"\\([/~[:alnum:]:]\\)[ 	]*\\([;#)}`|&]\\|$\\)"

  • This variable may be risky if used as a file-local variable.

Documentation:
Regexp to determine the end of a shell command.
The actual command ends at the end of the first \(grouping\).

You can customize this variable.