Merge pull request #357 from MaxSchambach/feature/hide-python-version

Add option to hide python version
pull/359/head
Justin Hileman 2 months ago committed by GitHub
commit 39cf45635b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -65,7 +65,7 @@ This theme is based loosely on [agnoster][btf-agnoster].
### Configuration
You can override some of the following default options in your `config.fish`:
You can override some of the following default options in your `config.fish` or `.conf/omf/init.fish`:
```fish
set -g theme_display_git no
@ -83,6 +83,7 @@ set -g theme_display_docker_machine no
set -g theme_display_k8s_context yes
set -g theme_display_hg yes
set -g theme_display_virtualenv no
set -g theme_display_virtualenv verbose
set -g theme_display_nix no
set -g theme_display_ruby no
set -g theme_display_node yes

@ -33,6 +33,7 @@
# set -g theme_display_aws_vault_profile yes
# set -g theme_display_hg yes
# set -g theme_display_virtualenv no
# set -g theme_display_virtualenv verbose
# set -g theme_display_nix no
# set -g theme_display_ruby no
# set -g theme_display_go no
@ -52,7 +53,6 @@
# set -g theme_project_dir_length 1
# set -g theme_newline_cursor yes
# ==============================
# Helper methods
# ==============================
@ -924,10 +924,22 @@ function __bobthefish_prompt_virtualfish -S -d "Display current Python virtual e
and return
set -l version_glyph (__bobthefish_virtualenv_python_version)
set -l prompt_style 'default'
if [ "$version_glyph" ]
__bobthefish_start_segment $color_virtualfish
echo -ns $virtualenv_glyph $version_glyph ' '
if string match -q "Python 2*" (python --version 2>&1 | string trim)
set prompt_style 'verbose'
else if [ "$theme_display_virtualenv" = 'verbose' ]
set prompt_style 'verbose'
end
if [ "$prompt_style" = 'verbose' ]
echo -ns $virtualenv_glyph $version_glyph ' '
else
echo -ns $virtualenv_glyph
end
end
if [ "$VIRTUAL_ENV" ]

Loading…
Cancel
Save