[v3.4] #940 fix custom prompt

resolves #940 on `release-v3.4`
Oh that actually is valid syntax for splitting a ternary operator onto multiple lines. Buuuuut we should never do that. https://github.com/bbatsov/ruby-style-guide#no-multiline-ternary