Re:Xonsh, a Python-ish, Bash-compatible shell language and c...
by scopatz42 on Sunday March 15, 2015 @10:38PM
(#9209460)
I'd readily accept any new demo videos :) Just use a white background so it matches the website theme
[ Parent
| on HN ]
Re:Xonsh, a Python-ish, Bash-compatible shell language and c...
by strunz on Monday March 16, 2015 @07:54AM
(#9210925)
Is there a reason xonsh doesn't honor the PS1 variable from bash to keep your terminal prefix? Or is there a way to customize xonsh's?
Example:
10:54:01 foo@bar:~/scripts/xonsh$ xonsh
foo@bar ~/scripts/xonsh $ # no time prefix
Re:Xonsh, a Python-ish, Bash-compatible shell language and c...
by untothebreach on Monday March 16, 2015 @08:28AM
(#9211030)
If you go to [http://xonsh.org/tutorial.html#environment-variables] and scroll down to the table, you can see how to change the prompt :)
Re:Xonsh, a Python-ish, Bash-compatible shell language and c...
by strunz on Monday March 16, 2015 @02:49PM
(#9213444)
Thanks, doesn't look like you can use anything that isn't in the supported keywords though (like date/time)
Re:Xonsh, a Python-ish, Bash-compatible shell language and c...
by roryokane on Monday March 16, 2015 @07:09PM
(#9215129)
It looks to me like you can.
> PROMPT: The prompt text, may be str or function which returns a str.
If you need non-built-in values in your prompt, just set PROMPT to a function, and call something like `date` within the function. Use `%` to format `date`’s output into a template string, and then pass that template string to `xonsh.environ.format_prompt` to get the final value to return from the function.