Commit c69632b5 authored by Łukasz Nowak's avatar Łukasz Nowak Committed by Rafael Monnerat

slaprunner: Expose instance_name in prompt

If provided, shows instance name value in the title, so it is easier to track
and relate shellinabox with a webrunner.

/reviewed-on !295
parent 4fcccdff
......@@ -19,7 +19,7 @@ md5sum = 713db528880282d568278f09458d2aab
[template-runner]
filename = instance-runner.cfg
md5sum = 8b1caca52ab1307343ebada59f5a6c66
md5sum = 16ff762e71c92f8a8e1062906eb10b9c
[template-runner-import-script]
filename = template/runner-import.sh.jinja2
......@@ -63,7 +63,7 @@ md5sum = f8446fcf254b4929eb828a9a1d7e5f62
[template-bash-profile]
filename = template/bash_profile.in
md5sum = 712ca70488051f97e7a7b11a02a06bb1
md5sum = 37eea89042a58127c85e6b3886260e59
[template-supervisord]
filename = template/supervisord.conf.in
......
......@@ -725,6 +725,7 @@ rendered = $${buildout:directory}/.bash_profile
context =
raw path $${shell-environment:path}
raw shell $${shell-environment:shell}
key instance_name slap-parameter:instance-name
key workdir runnerdirectory:home
#---------------------------
......
......@@ -5,6 +5,9 @@
cd {{ workdir }}
export PATH={{- path }}
export SHELL={{- shell }}
{%- if instance_name %}
export PROMPT_COMMAND='echo -en "\033]0;{{-instance_name}}\a"'
{% endif %}
export PS1="$ "
if [ -f "$HOME/.bashrc" ] ; then
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment