merge left/right prompt func.