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

No python env in prompt #520

Open
thistlillo opened this issue May 13, 2021 · 0 comments
Open

No python env in prompt #520

thistlillo opened this issue May 13, 2021 · 0 comments

Comments

@thistlillo
Copy link

thistlillo commented May 13, 2021

Hello, I was able to install power-line in my current git bash shell on Windows 10. Everything is fine, but there is no python environment in the prompt.

With respect to the default installation steps, I made the following additional ones:

  • (extra step) I had to add the following lines to ~/.bashrc because the command conda activate <env> was giving an error.
export PYTHONIOENCODING="utf-8"
source ~/miniconda3/etc/profile.d/conda.sh
  • I downloaded a specific theme in .bash/themes/git_bash_windows_powerline/theme.bash
  • I added a config.json in ~/.config/powerline-shell/ with this content:
{
  "segments": [
    "virtual_env",
    "ssh",
    "cwd",
    "git",
    "git_stash",
    "jobs",
    "set_term_title",
    "svn",
    "newline",
    "root"
  ],
  "mode": "flat",
  "cwd": {
    "mode": "plain",
    "max_depth": 2
  },
  "theme": "gruvbox"
}

My ~/.bashrc is:

export PYTHONIOENCODING="utf-8"
source ~/miniconda3/etc/profile.d/conda.sh

# Theme
THEME=$HOME/.bash/themes/git_bash_windows_powerline/theme.bash
if [ -f $THEME ]; then
   . $THEME
fi
unset THEME

However, if I check the theme.bash I do not find any reference to the python environment, while I can see a reference to it in the linked file https://github.com/Bash-it/bash-it/tree/master/themes/powerline, upon which the theme is based.

Is it possible to display the Python environment, in particular a conda environment, also in this powerline for the git bash?

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

No branches or pull requests

1 participant