Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optionally modify prompt to reflect currently used profile. #84

Open
reillysiemens opened this issue Jun 2, 2015 · 1 comment
Open
Milestone

Comments

@reillysiemens
Copy link
Collaborator

We could modify $PS1 or the like in the same fashion as virtualenv. This might involve some eval or source trickery. We might also investigate doing it in the style of git's __git_ps1.

An example prompt might look something like:
(default) user@localhost ~$
or
(work) user@fancy-company ~/secret/files$

@RadicalZephyr
Copy link
Collaborator

Two notes on implementation:

  • we want this to be opt-in, so it should probably be configurable by environment variables.
  • this should work across multiple shells, even though bash uses $PS1 and zsh uses $PROMPT etc.

A good source of inspiration are the __git_ps1 command and how it is configured, and rbenv init command.

@RadicalZephyr RadicalZephyr modified the milestone: 2.0 Dec 31, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants