• Mark Vander Stel's avatar
    Stop squashing Zsh prompt options · 58969b20
    Mark Vander Stel authored
    Based on the work done in ecdde384, the
    prompt_bang and prompt_subst options, which handle '!' and '$'/'`'
    characters respectively, can be left untouched. When running
    __lp_escape(), those options are checked, and if set, their characters
    are escaped.
    
    prompt_percent however, must still be enabled always. The shell sequence
    escapes, '%{' and '%}' only work when the option is enabled. Maybe
    someday we can detect when the option is off and disable all terminal
    formatting, but it doesn't seem worth the effort.
    
    Backslashes must be escaped even on Zsh to prevent confusion with a
    backslash directly preceding a character that would give is special
    meaning.
    58969b20