From 483f21b7407dcde9ee44291c472b2dad80cdf00f Mon Sep 17 00:00:00 2001 From: chmez Date: Sun, 12 Dec 2021 16:49:27 +0200 Subject: [PATCH] Issue #1: Load project title from the configuration file --- .bashrc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.bashrc b/.bashrc index 45ca8a2..f1babe4 100644 --- a/.bashrc +++ b/.bashrc @@ -1,2 +1,12 @@ -PS1="\[\033[1;32m\]LOCAL: \[\033[1;33m\]\w \[\033[10;31m\]> \[\033[0m\]\[\033[0m\]" +project=$(get_project) + +if [ -z $project ]; then + project="LOCAL: \[\033[1;33m\]\w" +else + project=$(get "${project}info_title") +fi + +PS1="\[\033[1;32m\]$project \[\033[10;31m\]> \[\033[0m\]\[\033[0m\]" + +unset project