Skip to content
Snippets Groups Projects
Commit f449a3e5 authored by Juntong Liu's avatar Juntong Liu
Browse files

keep the user shell prompt string if it exists. Make shfmt happy

parent 827aa3d7
No related branches found
No related tags found
1 merge request!40E3-341: Improve the shell prompt to display e3 info
...@@ -357,14 +357,14 @@ BASE_version=$(echo "${EPICS_BASE##*/}" | awk -F '-' '{print $2}') ...@@ -357,14 +357,14 @@ BASE_version=$(echo "${EPICS_BASE##*/}" | awk -F '-' '{print $2}')
E3_ENV_INFO="{B:$BASE_version R:$E3_REQUIRE_VERSION}" E3_ENV_INFO="{B:$BASE_version R:$E3_REQUIRE_VERSION}"
NEW_E3_PS="${E3_ENV_INFO}\[\033[33m\]\u\[\033[m\]@\[\033[33;1m\]\w\[\033[m\]\$ " NEW_E3_PS="${E3_ENV_INFO}\[\033[33m\]\u\[\033[m\]@\[\033[33;1m\]\w\[\033[m\]\$ "
if [ -z "$E3_ENV_ON" ]; then if [ -z "$E3_ENV_ON" ]; then
if [ -z "$PS1" ]; then if [ -z "$PS1" ]; then
export E3_ENV_ON="ON" export E3_ENV_ON="ON"
export PS1="${NEW_E3_PS}" export PS1="${NEW_E3_PS}"
else else
export E3_ENV_ON="ON" export E3_ENV_ON="ON"
export PS1="${E3_ENV_INFO}${PS1}" export PS1="${E3_ENV_INFO}${PS1}"
fi fi
else else
PS_TMP=${PS1/\{*\}/} PS_TMP=${PS1/\{*\}/}
export PS1="${E3_ENV_INFO}${PS_TMP}" export PS1="${E3_ENV_INFO}${PS_TMP}"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment