Properly escape finalterm code in PS1