term-prompt-regexp

term-prompt-regexp is a variable defined in `term.el'.
Its value is
"^"


Documentation:
Regexp to recognize prompts in the inferior process.
Defaults to "^", the null string at BOL.

Good choices:
Canonical Lisp: "^[^> \n]*>+:? *" (Lucid, franz, kcl, T, cscheme, oaklisp)
Lucid Common Lisp: "^\\(>\\|\\(->\\)+\\) *"
franz: "^\\(->\\|<[0-9]*>:\\) *"
kcl: "^>+ *"
shell: "^[^#$%>\n]*[#$%>] *"
T: "^>+ *"

This is a good thing to set in mode hooks.