Repository: xonsh/xonsh

Issue:
Newlines in $PROMPT are not rendered
## xonfig

Fresh install of xonsh on Ubuntu 21.10

<details>

```
BEI\slotmv@aln-lx912631:~||✓\n➤ echo $PROMPT
<stdin>:1:5 - echo $PROMPT
<stdin>:1:5 + ![echo $PROMPT]
{env_name}{BOLD_GREEN}{user}{RESET}@{hostname}:{BOLD_GREEN}{cwd}{RESET}|{gitstatus}\n{BOLD_INTENSE_RED}➤{RESET}
```

```
BEI\slotmv@aln-lx912631:~||✓\n➤ xonfig
<xonsh-code>:1:0 - xonfig
<xonsh-code>:1:0 + ![xonfig]
+------------------+-----------------------+
| xonsh            | 0.12.2                |
| Git SHA          | e0a0394b              |
| Commit Date      | Apr 25 10:52:15 2022  |
| Python           | 3.9.7                 |
| PLY              | 3.11                  |
| have readline    | True                  |
| prompt toolkit   | 3.0.24                |
| shell type       | prompt_toolkit        |
| history backend  | json                  |
| pygments         | 2.7.1                 |
| on posix         | True                  |
| on linux         | True                  |
| distro           | ubuntu                |
| on wsl           | False                 |
| on darwin        | False                 |
| on windows       | False                 |
| on cygwin        | False                 |
| on msys2         | False                 |
| is superuser     | False                 |
| default encoding | utf-8                 |
| xonsh encoding   | utf-8                 |
| encoding errors  | surrogateescape       |
| xontrib          | []                    |
| RC file 1        | /home/slotmv/.xonshrc |
+------------------+-----------------------+


```

</details>


## Expected Behavior
I expect the xonsh prompt to be rendered as in the web-preview:

(env) lou@carcolh:~/snail/stuff|branch|+2⚑7
➤ 


## Current Behavior
The prompt is instead rendered as follows:
(env) lou@carcolh:~/snail/stuff|branch|+2⚑7\n➤ 


## Steps to Reproduce
- Install xonsh using `sudo pip install xonsh`
- Run `xonfig web`
- Select color-scheme and prompt
- Start new xonsh-shell



Discussion:
What if you set the `$PROMPT` variable to the string above? I have not tried `xonfig web` but setting the prompt the to the string you provided works as expected:
![image](https://user-images.githubusercontent.com/126637/166805029-5a11488b-497c-4435-9161-841e2a35ca41.png)

This is a bug in our `xonfig web` setup -- the newlines are getting written out as escaped newlines `\\n` which is very much _not_ what we want.

@vslotman -- for now, if you edit the `$PROMPT` variable that `xonfig web` wrote to your `xonshrc` to remove the extraneous `\` from the newline, it should render correctly.

thanks for reporting!

Resolving patch:
diff --git a/xonsh/webconfig/xonsh_data.py b/xonsh/webconfig/xonsh_data.py
--- a/xonsh/webconfig/xonsh_data.py
+++ b/xonsh/webconfig/xonsh_data.py
@@ -95,7 +95,7 @@ def get_named_prompts():
         (
             "terlar",
             "{env_name}{BOLD_GREEN}{user}{RESET}@{hostname}:"
-            "{BOLD_GREEN}{cwd}{RESET}|{gitstatus}\\n{BOLD_INTENSE_RED}➤{RESET} ",
+            "{BOLD_GREEN}{cwd}{RESET}|{gitstatus}\n{BOLD_INTENSE_RED}➤{RESET} ",
         ),
         (
             "default with git status",
@@ -108,12 +108,12 @@ def get_named_prompts():
         (
             "simple pythonista",
             "{INTENSE_RED}{user}{RESET} at {INTENSE_PURPLE}{hostname}{RESET} "
-            "in {BOLD_GREEN}{cwd}{RESET}\\n↪ ",
+            "in {BOLD_GREEN}{cwd}{RESET}\n↪ ",
         ),
         (
             "informative",
             "[{localtime}] {YELLOW}{env_name} {BOLD_BLUE}{user}@{hostname} "
-            "{BOLD_GREEN}{cwd} {gitstatus}{RESET}\\n> ",
+            "{BOLD_GREEN}{cwd} {gitstatus}{RESET}\n> ",
         ),
         (
             "informative Version Control",
@@ -137,7 +137,7 @@ def get_named_prompts():
             "nim",
             "{INTENSE_GREEN}┬─[{YELLOW}{user}{RESET}@{BLUE}{hostname}{RESET}:{cwd}"
             "{INTENSE_GREEN}]─[{localtime}]─[{RESET}G:{INTENSE_GREEN}{curr_branch}=]"
-            "\\n{INTENSE_GREEN}╰─>{INTENSE_RED}{prompt_end}{RESET} ",
+            "\n{INTENSE_GREEN}╰─>{INTENSE_RED}{prompt_end}{RESET} ",
         ),
     ]
 


Test patch: