Skip to content
This repository has been archived by the owner on Jan 12, 2021. It is now read-only.

prompt with info about EPICS version #15

Closed
rizzoa opened this issue Sep 13, 2019 · 5 comments
Closed

prompt with info about EPICS version #15

rizzoa opened this issue Sep 13, 2019 · 5 comments
Assignees
Milestone

Comments

@rizzoa
Copy link

rizzoa commented Sep 13, 2019

Hi Han,
if you add the below two lines on setE3Env.sh the prompt will show the EPICS version if it sourced. This is useful when you have multiple shell windows open to be sure that actually you are running in the correct environment.

.................
IFS='-' read -ra base <<< "$EPICS_BASE"
PS1="[\d \t] $(tput setaf 4)\u@centos7VM:\w $ [$(tput sgr0)](EPICS-${base[1]})> "

@jeonghanlee
Copy link
Contributor

Good idea! However, we cannot change the user shell prompt. I will add them into the different name shell. In case, people would like to use the changed prompt shell, one can use the upcoming one.

@jeonghanlee jeonghanlee self-assigned this Sep 13, 2019
@jeonghanlee jeonghanlee transferred this issue from icshwi/e3 Sep 13, 2019
@jeonghanlee
Copy link
Contributor

@rizzoa It turns out there is no generic way at this moment, I can apply it. Each people has their own prompt. For example, the way you propose is to override more rich functionalities (git, path, or more) of my own prompt. However, I will propose one later with the difference name.

@rizzoa
Copy link
Author

rizzoa commented Sep 18, 2019

Hi Han,
If I undersand your concern, I think that it could be done something similar to the following
IFS='-' read -ra base <<< "$EPICS_BASE"
PS1=(EPICS-${base[1]})$PS1
Then your prompt is not overridden , it has more just the info about the epics version.

@jeonghanlee
Copy link
Contributor

Thank you @rizzoa .

@jeonghanlee jeonghanlee added this to the Release 3.1.2 milestone Sep 20, 2019
@jeonghanlee
Copy link
Contributor

  • implemented at 3d96034
  • introduced with promptE3Env.bash.
  • install in the installation path
  • no time to find the proper override PS1 now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants