jnoortheen / xontrib-powerline3

powerline theme for xonsh with async prompt support.
MIT License
11 stars 4 forks source link

ret_code not parsed #7

Closed sbliven closed 3 years ago

sbliven commented 3 years ago

I am trying to use {ret_code} in my prompt but it get's printed literally:

{ret_code}>~>$>

In my xonshrc I have

$POWERLINE_MODE = "powerline"
$PROMPT = "".join(
    [
        "{ret_code}",
        "{full_env_name: 🐍{}}",
        "{cwd:{}}",
        "{gitstatus:{}}",
        "{prompt_end}",
    ]
)

I copied this from the README, but I didn't really understand the formatting syntax.

jnoortheen commented 3 years ago

that prompt-field comes from prompt_ret_code xontrib.

You need to load it by either

xontrib load prompt_ret_code 

or 

import xontrib.prompt_ret_code
jnoortheen commented 3 years ago

thanks for bringing it. Now the README is updated.