blob: 0663bfde05aacc9b1a14805b69a031e7eac28098 [file] [log] [blame]
{%- from "linux/map.jinja" import system with context %}
# Don't set special prompt when not using Bash or ZSH
[ -n "$BASH_VERSION" -o -n "$ZSH_VERSION" ] || return 0
# Don't set prompt on non-interactive shell
[[ $- == *i* ]] || return 0
{%- for user, prompt in system.prompt.iteritems() %}
{% if user != "default" %}
if [ "$USERNAME" == "{{ user }}" ]; then
export PS1="{{ prompt }} "
return 0
fi
{% endif %}
{%- endfor %}
{% if system.prompt.default is defined %}
export PS1="{{ system.prompt.default }} "
{%- endif %}