Powerlevel9k / powerlevel9k

Powerlevel9k was a tool for building a beautiful and highly functional CLI, customized for you. P9k had a substantial impact on CLI UX, and its legacy is now continued by P10k.
https://github.com/romkatv/powerlevel10k
MIT License
13.46k stars 949 forks source link

[feature] Honor multiline prefix parameters even when POWERLEVEL9K_PROMPT_ON_NEWLINE is false #1362

Open romkatv opened 4 years ago

romkatv commented 4 years ago

Currently parameters such as POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX have no effect unless POWERLEVEL9K_PROMPT_ON_NEWLINE is true. It would be nice to remove this restriction. Then one could define prompts line this:

frame

Backward compatibility is a bit tricky. In my fork I implemented this feature as follows:

  1. If POWERLEVEL9K_PROMPT_ON_NEWLINE is true, display prefixes the same as in the original powerlevel9k.
  2. If POWERLEVEL9K_PROMPT_ON_NEWLINE is false, display only those prefixes that are defined explicitly by the user.

This didn't cause any complaints from users. Presumably, if someone explicitly sets POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX, they want it to have some effect, so honoring this parameter does't break anything even though it's technically not backward compatible with powerlevel9k.

brianjlandau commented 4 years ago

Is there a fix/workaround for this?