From 5cc31ede9cc1b4fcb59139d5c2ef519896b3b966 Mon Sep 17 00:00:00 2001 From: James Hunt Date: Thu, 14 Apr 2016 15:44:14 -0400 Subject: [PATCH] Use ERB template vars in PS1 prompt --- ci/release_notes.md | 3 +++ jobs/toolbelt/templates/envrc | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 ci/release_notes.md diff --git a/ci/release_notes.md b/ci/release_notes.md new file mode 100644 index 0000000..b65c51b --- /dev/null +++ b/ci/release_notes.md @@ -0,0 +1,3 @@ +## Bug Fixes + +- Use ERB template variables in Toolbelt prompt diff --git a/jobs/toolbelt/templates/envrc b/jobs/toolbelt/templates/envrc index 4839969..ae180f7 100644 --- a/jobs/toolbelt/templates/envrc +++ b/jobs/toolbelt/templates/envrc @@ -18,9 +18,9 @@ for package in $(find /var/vcap/packages -type l -name 'toolbelt-*'); do done if [[ "${UID}" -eq 0 ]]; then - export PS1=$(echo '==[]=[ \[\e[1;33m\t\e[0m\] ]=[ \[\e[1;34m\]toolbelt-warden\[\e[0m\] \[\e[1;32m\]toolbelt/0\[\e[0m\] ]=[ \[\e[1;34m\]\w\[\e[0m\] ]=[]==\n\[\e[1;31m\]\$ \[\e[0m\]') + export PS1=$(echo '==[]=[ \[\e[1;33m\t\e[0m\] ]=[ \[\e[1;34m\]<%= spec.deployment %>\[\e[0m\] \[\e[1;32m\]<%= spec.job.name %>/<%= spec.index %>/\[\e[0m\] ]=[ \[\e[1;34m\]\w\[\e[0m\] ]=[]==\n\[\e[1;31m\]\$ \[\e[0m\]') else - export PS1=$(echo '==[]=[ \[\e[1;33m\t\e[0m\] ]=[ \[\e[1;34m\]toolbelt-warden\[\e[0m\] \[\e[1;32m\]toolbelt/0\[\e[0m\] ]=[ \[\e[1;34m\]\w\[\e[0m\] ]=[]==\n\[\e[1;34m\]\$ \[\e[0m\]') + export PS1=$(echo '==[]=[ \[\e[1;33m\t\e[0m\] ]=[ \[\e[1;34m\]<%= spec.deployment %>\[\e[0m\] \[\e[1;32m\]<%= spec.job.name %>/<%= spec.index %>/\[\e[0m\] ]=[ \[\e[1;34m\]\w\[\e[0m\] ]=[]==\n\[\e[1;34m\]\$ \[\e[0m\]') fi <%= p('toolbelt.envrc') %>