oh-my-fish / theme-bobthefish

A Powerline-style, Git-aware fish theme optimized for awesome.
MIT License
1.46k stars 225 forks source link

pipenv name shown twice #253

Closed BeLeap closed 7 months ago

BeLeap commented 4 years ago

image As you can see above, pipenv name is shown twice. How can I remove it?

Here is my configuration: image Using WSL Ubuntu 20.04

bobthecow commented 4 years ago

It looks like the first one is supplied by pipenv itself? I imagine there’s an environment variable or something to suppress it, but I can’t say for sure because I don’t usually use it.

DemonInTheCloset commented 4 years ago

This too happens with virtualenv: image

bobthecow commented 4 years ago

ooh! i know the answer to that one. it's in the readme :)

If you use virtualenv, you will probably need to disable the default virtualenv prompt, since it doesn't play nice with fish: set -x VIRTUAL_ENV_DISABLE_PROMPT 1

tchellomello commented 2 years ago

Hm.. I already have it and still seeing the duplicated

image

bobthecow commented 2 years ago

the one to the left in parenthesis is "outside" the prompt, so I'm not entirely sure what's providing it.

check the output of functions fish_prompt and fish_mode_prompt, to see if something is hijacking one of those?

tchellomello commented 2 years ago

@bobthecow yup, that did the trick. It was being activated by the activate.fish from the py venv

# Defined in /home/mdemello/.virtualenvs/default/bin/activate.fish @ line 51
function fish_prompt
        # Save the return status of the last command.
        set -l old_status $status

        # Output the venv prompt; color taken from the blue of the Python logo.
        printf "%s%s%s" (set_color 4B8BBE) "(py3.10) " (set_color normal) <== here

        # Restore the return status of the previous command.
        echo "exit $old_status" | .
        # Output the original/"old" prompt.
        _old_fish_prompt

end

Thanks for the tip!