mongodb/mongo — pull request #122 by tadmarshall (2011-10-13 12:29:54+00:00)
Title: SERVER-3771 -- part 1 (reissue 2) -- don't let 'prompt' become undefined

This is a reissue of my earlier fix. I'm trying to break them down into
bite-sized parts to make them easier to pull.

Test the return value from a call to a function prompt (included regex)
and only use it if it is a string. If we have no string prompt, display
the default prompt = sayReplSetMemberState()+"> "; . Edited for style.